SDKs & Libraries
First-party Python and Node.js clients, plus how to point existing OpenAI-compatible tooling at PARROTSIGHT with one line.
Updated Sep 2026
For teams that prefer typed clients over raw HTTP, PARROTSIGHT publishes official SDKs for Python and Node.js. Both wrap the same REST surface, handle retries and timeouts on your behalf, and read the key from the environment by default.
If you are already invested in an OpenAI-compatible stack, you can skip the SDKs entirely and repoint your existing client at our base URL.
Python
Install the package, then initialise a client with your key. Passing no arguments reads PS_API_KEY from the environment.
pip install parrotsightPython usage
from parrotsight import Parrotsight
client = Parrotsight() # reads PS_API_KEY from the environment
completion = client.chat.completions.create(
model="ps-lingua-7b",
messages=[
{"role": "system", "content": "You are a concise technical assistant."},
{"role": "user", "content": "Summarise the difference between a rate limit and a quota."},
],
max_tokens=96,
)
print(completion.choices[0].message.content)Node.js
Install the package from npm, then construct a client. The library exposes the same method shapes as the REST reference.
npm install @parrotsight/sdkNode.js usage
import { Parrotsight } from "@parrotsight/sdk";
const client = new Parrotsight({ apiKey: process.env.PS_API_KEY });
const embeddings = await client.embeddings.create({
model: "ps-embed-base",
input: ["Cara memperbaharui lesen perniagaan", "How to renew a business licence"],
});
console.log(embeddings.data[0].embedding.length); // 1024OpenAI compatibility
The chat and embeddings endpoints are wire-compatible with the OpenAI client libraries. Set the base URL to https://api.parrotsight.com/v1 and use a PARROTSIGHT key; the model ids change but no other code does.
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PS_API_KEY"],
base_url="https://api.parrotsight.com/v1",
)
resp = client.chat.completions.create(
model="ps-lingua-7b",
messages=[{"role": "user", "content": "What region does PARROTSIGHT serve from?"}],
)
print(resp.choices[0].message.content)Choosing a path
The right integration strategy depends on how much of the stack you already own.
- Use the official SDKs when you want typed models, built-in retries and minimal code.
- Repoint your existing OpenAI client when migrating a current pipeline with zero rewrite.
- Use raw HTTP for one-off scripts, curl debugging, or environments without a language runtime.
Was this helpful?
Your feedback shapes how we improve this documentation.