Clients
OpenAI SDKs
Use the official OpenAI SDKs with Drise.
The official OpenAI SDKs work with Drise by overriding baseURL.
Python
from openai import OpenAI
client = OpenAI(
api_key="<your_drise_key>",
base_url="https://platform.drise.ai/v1",
)
response = client.chat.completions.create(
model="drise-glm-5.2",
messages=[{"role": "user", "content": "say hi from drise"}],
)
print(response.choices[0].message.content)TypeScript / Node
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.DRISE_KEY,
baseURL: "https://platform.drise.ai/v1",
});
const res = await client.chat.completions.create({
model: "drise-glm-5.2",
messages: [{ role: "user", content: "say hi from drise" }],
});
console.log(res.choices[0].message.content);Notes
- Streaming, tool calls, and structured outputs follow the OpenAI shapes.