OpenAI and Anthropic Compatible API for Open-Source Models | Gonka Broker
Gonka Broker

One API compatible with OpenAI and Anthropic

Point the SDK your code already uses, OpenAI or Anthropic, at Gonka Broker. Change the base URL and your API key, and your existing code runs open-source models on the Gonka network.

OpenAI-compatible API

Set base_url to https://proxy.gonkabroker.com/v1 and use your gnk-prx- key. Everything else (request shape, streaming, tool calls) works the same in nearly every case.

from openai import OpenAI

client = OpenAI(
    base_url="https://proxy.gonkabroker.com/v1",
    api_key="gnk-prx-YOUR_KEY_HERE",
)

resp = client.chat.completions.create(
    model="MiniMaxAI/MiniMax-M2.7",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(resp.choices[0].message.content)

Here's what that unlocks. Tool-by-tool setup guides live in the integrations catalog.

SDKs

Official OpenAI libraries for Python, JavaScript/TypeScript, Go, and more.

AI tools

Cursor, Continue, LibreChat, and anything with a custom OpenAI endpoint.

Frameworks

LangChain, LlamaIndex, and other libraries built on the OpenAI format.

Migrating an existing app? See the OpenAI migration guide.

Anthropic-compatible API

The same models over the Anthropic Messages protocol: point your client at https://proxy.gonkabroker.com and authenticate with x-api-key. Streaming, tool use, thinking blocks, and count_tokens all work.

from anthropic import Anthropic

client = Anthropic(
    base_url="https://proxy.gonkabroker.com",
    api_key="gnk-prx-YOUR_KEY_HERE",
)

resp = client.messages.create(
    model="moonshotai/Kimi-K2.6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)

print(resp.content[0].text)

Here's what that unlocks on the Anthropic side. Setup guides are in the integrations catalog.

SDKs

Official Anthropic libraries for Python and TypeScript: the Messages API, streaming, and tool use included.

Claude Code

Point your Claude Code agent at Gonka via ANTHROPIC_BASE_URL and run it on open-source models.

Agent tools

Any tool or framework that speaks the Anthropic Messages protocol and lets you set a base URL.

Running a Claude Code agent? See how to run it on open-source models.

Compatibility FAQ

Is the Anthropic API compatible with OpenAI?

Not directly: the official APIs use different endpoints and request shapes. That's why Gonka Broker exposes both surfaces over the same models and the same key. OpenAI clients use /v1/chat/completions, Anthropic clients use /v1/messages.

Do I need different keys for the two protocols?

No. One gnk-prx- key works on both surfaces: a Bearer token on the OpenAI side, x-api-key (or Bearer) on the Anthropic side. Billing and the free tier are shared.

Do you serve GPT or Claude models?

No. Gonka Broker serves open-source models (Kimi K2, MiniMax M2, BGE-M3) over both the OpenAI and Anthropic protocols. We are an independent service, not affiliated with OpenAI or Anthropic.

Drop Gonka into your app

Get a key, change two lines in your OpenAI or Anthropic client, and run open-source models in plain USD.

Get started

Already have an account? Sign in