OpenAI SDK Guides
Choose the runtime guide for the official OpenAI SDK with GonkaGate.
Choose the runtime guide for the official OpenAI SDK after you have one working GonkaGate request. If you use LangChain, Vercel AI SDK, Aider, Cline, Roo Code, or another wrapper or community tool, use Framework & Tool Guides instead. If you use Claude Code, Cursor, Kilo Code, OpenCode, or OpenClaw, use the dedicated Claude Code, Cursor, Kilo Code, OpenCode, or OpenClaw page instead.
Shared OpenAI SDK shape
client = OpenAI-compatible SDK client
base_url / baseURL = "https://api.gonkagate.com/v1"
api_key = "gp-your-api-key"
response = client.chat.completions.create(
model = "current GonkaGate model ID",
messages = [...]
)Expected result: keep the same chat.completions.create(...) request shape in Python, TypeScript, Go, .NET, or Java. Only client setup and runtime-specific ergonomics change.
Before you open a runtime guide
- One successful GonkaGate request or migration smoke test
- A saved
gp-...API key that your app can read from a secret store or environment variable - A current GonkaGate model ID for the workload you are integrating
- A server-side place to keep the key out of browsers and public bundles
Choose a runtime guide
- Python SDK: backend services, jobs, and scripts with sync or async clients.
- TypeScript SDK: Node.js, Deno, Bun, and edge-friendly runtimes.
- Go SDK:
context.Context, explicit timeouts, and service-level client reuse. - .NET SDK: Betalgo.OpenAI with DI-friendly client setup.
- Java SDK:
openai-javawith explicit client configuration.
Common SDK errors and compatibility notes
401 invalid_api_keyusually means the key is missing, malformed, or unavailable in the runtime where the SDK runs.404 model_not_foundusually means the SDK setup is fine but the model ID is stale.429 insufficient_quotameans the prepaid USD balance is too low for the request.- If your app narrows
usage, allow additive GonkaGate cost fields such asbase_cost_usd,platform_fee_usd, andtotal_cost_usd.
See also
- OpenAI SDK Compatibility for GonkaGate for the shared base URL, API key, model ID, and additive
usagerules across runtimes. - Authentication and API Keys to create, store, and rotate
gp-...keys. - GonkaGate Quickstart if you still need one verified request before SDK wiring.
- Migrate from OpenAI to GonkaGate if you are switching an already-working OpenAI app.
- Framework & Tool Guides if you integrate through LangChain, Vercel AI SDK, Aider, Cline, Roo Code, or another wrapper or community tool.
- Claude Code, Cursor, Kilo Code, OpenCode, and OpenClaw if you use an agent-owned tool path.
Was this page helpful?