OpenAI SDK
Any OpenAI client works with a different base URL.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://simpang.zakiego.com/api/v1",
apiKey: process.env.SIMPANG_API_KEY,
});
const res = await client.chat.completions.create({
model: "claude-sonnet-4-5-20250929",
messages: [{ role: "user", content: "Hi" }],
});Python:
from openai import OpenAI
client = OpenAI(base_url="https://simpang.zakiego.com/api/v1", api_key="sk-sp-...")
res = client.chat.completions.create(
model="claude-sonnet-4-5-20250929",
messages=[{"role": "user", "content": "Hi"}],
)Streaming works the same. Ask for stream_options: { include_usage: true } if you want the usage chunk at the end.