Integrations

OpenAI SDK

Change two constructor arguments. Everything else about the SDK stays the same.

Python

Python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.overagent.cc/v1",
    api_key=os.environ["OVERAGENT_API_KEY"],
)

response = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

JavaScript and TypeScript

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.overagent.cc/v1",
  apiKey: process.env.OVERAGENT_API_KEY,
});

const response = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(response.choices[0]?.message.content);

Streaming

stream = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Count to ten."}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta
    if delta.content:
        print(delta.content, end="", flush=True)

Gateway-specific fields

thinking, reasoning_effort, fast, and fallbacks are not in the SDK's typed surface. Pass them through the SDK's escape hatch for extra body fields:

response = client.chat.completions.create(
    model="claude-opus-5",
    messages=[{"role": "user", "content": "Think this through."}],
    extra_body={"thinking": True, "reasoning_effort": "high"},
)