OpenAI-compatible clients
Point any OpenAI SDK or app at https://api.openbroker.gonka.gg/v1 with an obk- key and a full model id.
If a client works against the OpenAI chat API, it works against OpenBroker when three settings are right: base URL, API key, and model id.
| Setting | Value |
|---|---|
| Base URL | https://api.openbroker.gonka.gg/v1 |
| API key | obk-... from the dashboard |
| Model | Full id from GET /v1/models |
Python and Node
from openai import OpenAI
client = OpenAI(
base_url="https://api.openbroker.gonka.gg/v1",
api_key="obk-YOUR_API_KEY",
)
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[{"role": "user", "content": "Explain devshards in one sentence."}],
max_tokens=100,
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.openbroker.gonka.gg/v1",
apiKey: "obk-YOUR_API_KEY",
});
const response = await client.chat.completions.create({
model: "MiniMaxAI/MiniMax-M2.7",
messages: [{ role: "user", content: "Explain devshards in one sentence." }],
max_tokens: 100,
});
console.log(response.choices[0].message.content);Install the official SDK (pip install openai or npm install openai). You do not need an OpenAI account.
Apps that add /v1 themselves
Some tools ask for an origin and then append /v1/chat/completions on their own. If you also paste the /v1 suffix, the request goes to /v1/v1/chat/completions and fails.
- The field says "base URL" and the docs show a path ending in
/v1: usehttps://api.openbroker.gonka.gg/v1. - The field says "host" or you observe a doubled
/v1: usehttps://api.openbroker.gonka.ggonly.
Timeouts
Set the request timeout to several minutes. A 15 or 30 second limit while waiting for the first byte produces 502s during host selection. Streaming apps should use the same budget.
App notes for LangChain and IDE clients are in Apps.
What not to paste
Do not paste a dashboard session, an operator token, or a Gonka wallet private key into an API-key field. The inference key is only the obk- secret.