/ Docs
Integrations

Connect your tools

KodaAPI is fully compatible with the OpenAI API standard. Any tool or library that supports a custom base_url can route through KodaAPI to access every supported model with a single API key.

How it works

You replace two values in your existing code — that's it. No new SDKs, no new abstractions.

base_url https://kodaapi.com/v1
api_key koda-xxxxxxxxxxxxxxxx (from your dashboard)

All requests go to https://kodaapi.com/v1/chat/completions. KodaAPI routes to the right provider based on the model field.

Your credentials

Get your API key from the Dashboard → API Keys tab. Keys start with koda-.

Tip

Never expose your key in client-side code. Set it as an environment variable: KODAAPI_KEY.

Python SDK

Install the official OpenAI library and point it at KodaAPI:

bash
pip install openai
python
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["KODAAPI_KEY"],
    base_url="https://kodaapi.com/v1",
)

response = client.chat.completions.create(
    model="gpt-4.1-mini",  # or claude-sonnet-4-6, gemini-2.5-flash, ...
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Streaming

python
with client.chat.completions.stream(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Write a haiku."}],
) as stream:
    for chunk in stream:
        print(chunk.choices[0].delta.content or "", end="")

Node.js SDK

bash
npm install openai
typescript
import OpenAI from "openai"

const client = new OpenAI({
  apiKey: process.env.KODAAPI_KEY,
  baseURL: "https://kodaapi.com/v1",
})

const response = await client.chat.completions.create({
  model: "gemini-2.5-flash",
  messages: [{ role: "user", content: "Hello!" }],
})

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

Vercel AI SDK

typescript
import { createOpenAI } from "@ai-sdk/openai"
import { generateText } from "ai"

const koda = createOpenAI({
  apiKey: process.env.KODAAPI_KEY,
  baseURL: "https://kodaapi.com/v1",
})

const { text } = await generateText({
  model: koda("claude-opus-4-8"),
  prompt: "Explain quantum computing in one paragraph.",
})

cURL

bash
curl https://kodaapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $KODAAPI_KEY" \
  -d '{
    "model": "gpt-4.1-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Claude Code

Claude Code is Anthropic's official CLI. You can point it at KodaAPI to use any supported model or to route through your own account balance.

Note

Claude Code works best with Anthropic models. Set the environment variable below to route Claude Code requests through KodaAPI.

bash
# Set in your shell profile (~/.bashrc, ~/.zshrc, etc.)
export ANTHROPIC_API_KEY="koda-xxxxxxxxxxxxxxxx"
export ANTHROPIC_BASE_URL="https://kodaapi.com/v1"

Then run Claude Code normally — it will route through KodaAPI and deduct from your points balance.

bash
claude  # starts Claude Code CLI

Cursor

Cursor supports custom OpenAI-compatible endpoints via its settings panel.

  1. Open Cursor SettingsModels
  2. Scroll to OpenAI API Key and enter your KodaAPI key: koda-xxxxxxxxxxxxxxxx
  3. Toggle on Override OpenAI Base URL and set it to https://kodaapi.com/v1
  4. Click Verify — Cursor will confirm the connection
  5. Select any model from the model list (GPT-4.1, Claude, Gemini, etc.)
Tip

You can now use Claude or Gemini models inside Cursor without needing separate API keys for each provider.

Continue.dev

Continue is an open-source AI coding assistant for VS Code and JetBrains. Add KodaAPI as a custom provider in ~/.continue/config.json:

json (~/.continue/config.json)
{
  "models": [
    {
      "title": "KodaAPI – Claude Sonnet",
      "provider": "openai",
      "model": "claude-sonnet-4-6",
      "apiKey": "koda-xxxxxxxxxxxxxxxx",
      "apiBase": "https://kodaapi.com/v1"
    },
    {
      "title": "KodaAPI – GPT-4.1",
      "provider": "openai",
      "model": "gpt-4.1",
      "apiKey": "koda-xxxxxxxxxxxxxxxx",
      "apiBase": "https://kodaapi.com/v1"
    }
  ]
}

LangChain

python
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="claude-sonnet-4-6",
    openai_api_key="koda-xxxxxxxxxxxxxxxx",
    openai_api_base="https://kodaapi.com/v1",
)

response = llm.invoke("Tell me a joke.")
print(response.content)

Any OpenAI-compatible client

If a tool supports OpenAI, it supports KodaAPI. The two values to change are always the same:

Base URL / API Base https://kodaapi.com/v1
API Key koda-xxxxxxxxxxxxxxxx

Supported model prefixes and their providers:

  • gpt-, o1, o3, o4 → OpenAI
  • claude- → Anthropic
  • gemini- → Google
  • qwen → Alibaba (Qwen)
  • seed-, doubao-, ep- → BytePlus
Model availability

A model must be enabled on your account for the request to succeed. Check All Models for the current list.

Next steps