Examples
Any client that supports a custom OpenAI base URL works. Set:
- Base URL →
https://<host>/api/openai/v1(no trailing path beyond/v1) - API key → your
sk-tbl-…key - Model → prefer
default-assistantor an agent slug fromGET /models
OpenAI Python SDK
python
from openai import OpenAI
client = OpenAI(
api_key="sk-tbl-...",
base_url="https://taibles.ai/api/openai/v1",
)
# Agent (recommended starting point)
r = client.chat.completions.create(
model="default-assistant",
messages=[{"role": "user", "content": "Draft a status update for the ops channel."}],
)
print(r.choices[0].message.content)
# Stream
with client.chat.completions.create(
model="default-assistant",
messages=[{"role": "user", "content": "Explain our refund policy briefly."}],
stream=True,
) as stream:
for chunk in stream:
delta = chunk.choices[0].delta.content or ""
print(delta, end="", flush=True)OpenAI Node.js SDK
javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TAIBLES_API_KEY,
baseURL: "https://taibles.ai/api/openai/v1",
});
const stream = await client.chat.completions.create({
model: "default-assistant",
messages: [{ role: "user", content: "List three next actions for onboarding." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}Continue a conversation
python
first = client.chat.completions.create(
model="default-assistant",
messages=[{"role": "user", "content": "My project codename is Orion."}],
)
conversation_id = first.taibles["conversation_id"] # or response header
follow_up = client.chat.completions.create(
model="default-assistant",
messages=[{"role": "user", "content": "What was the codename?"}],
extra_body={"taibles": {"conversation_id": conversation_id}},
)Depending on the SDK version, extension fields may appear as a dict on the response object or only in the raw JSON / X-Taibles-Conversation-Id header. Prefer the header if your client strips unknown fields.
List models
bash
curl "$BASE_URL/models" \
-H "Authorization: Bearer $YOUR_API_KEY"Use returned agent id values as model for specialized agents you built in TAIBLES.
Cursor / other OpenAI-compatible tools
In any tool that asks for an OpenAI-compatible provider:
| Setting | Value |
|---|---|
| API Base / Base URL | https://taibles.ai/api/openai/v1 |
| API Key | sk-tbl-… |
| Model | default-assistant (or an agent slug / LLM URL from /models) |
You are calling your TAIBLES workspace — not a generic public model marketplace. Capabilities follow the agent you select.