Gigatokens API — quickstart
OpenAI-compatible inference API served from the United Kingdom. Base URL https://api.gigatokens.ai/v1. Zero data retention: prompts and completions are never stored.
Authentication
Send your key as Authorization: Bearer gt-…. Keys are issued in your organisation's console or by your Gigatokens contact.
Chat completions
curl https://api.gigatokens.ai/v1/chat/completions \
-H "Authorization: Bearer $GIGATOKENS_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"gigatokens/kimi-k3","messages":[{"role":"user","content":"Hello"}],"stream":true}'
Any OpenAI SDK works by changing the base URL:
from openai import OpenAI
client = OpenAI(base_url="https://api.gigatokens.ai/v1", api_key="gt-...")
r = client.chat.completions.create(model="gigatokens/kimi-k3", messages=[{"role": "user", "content": "Hello"}])
print(r.choices[0].message.content, r.usage)
Supported: streaming (SSE, with a final usage chunk), tools/function calling, JSON mode, /v1/completions, /v1/embeddings. Errors follow the OpenAI {"error": {...}} shape.
Models
| Model id | Context | Reasoning | $/M input | $/M cached | $/M output |
|---|---|---|---|---|---|
gigatokens/kimi-k3 | 1,048,576 | yes | 2.4 | 0.2 | 12 |
gigatokens/glm-5.3 | 1,048,576 | yes | 1.1 | 0.2 | 3.5 |
gigatokens/glm-5.3-flash | 1,048,576 | no | 0.06 | 0.02 | 0.2 |
gigatokens/deepseek-v4-flash | 1,048,576 | no | 0.07 | 0.016 | 0.14 |
gigatokens/qwen3.8-max | 1,048,576 | yes | 1.6 | 0.2 | 4.8 |
gigatokens/behavox-quantum-4.2 | 131,072 | no | 5 | 0.5 | 25 |
gigatokens/behavox-polaris-2.3 | 131,072 | no | 5 | 0.5 | 25 |
Live catalogue: GET /v1/models. Reasoning models spend part of max_tokens on hidden reasoning; use max_tokens ≥ 400 (see recommended_min_max_tokens).
Usage and limits
GET /v1/usage?days=30 returns your key's requests, tokens and cost by model, and month-to-date spend against its budget. Rate limits return 429 with Retry-After; exhausted budgets return 402.
Working with the API
| Base URL | https://api.gigatokens.ai/v1 — OpenAI-compatible: /chat/completions (streaming, tools, JSON mode), /completions, /embeddings, /models, /key, /usage. |
|---|---|
| Keys | Authorization: Bearer gt-… (also x-api-key). Issued by your organisation's owner/admin in the console or by your Gigatokens contact. Use one key per application or environment; revoke from the console. |
| Model ids | gigatokens/<model> (short aliases such as kimi-k3 also work). Live list: GET /v1/models. Reasoning models spend part of max_tokens on hidden reasoning — send max_tokens ≥ 400. |
| Rate limits | Per key and per organisation requests-per-minute → 429 with Retry-After; daily token and monthly budget caps → 402/429 with codes starting org_; a per-IP edge ceiling of 3000 req/min. Retry with backoff on 429; keep 402 as a signal to the account owner. |
| Streaming | Server-sent events; a final chunk carries usage (stream_options.include_usage is honoured). |
| Usage | GET /v1/usage?days=30 — requests, tokens and cost by model for the calling key, month-to-date spend against its budget. GET /v1/key — the key's own limits. |
| Data | Served from the United Kingdom. Zero data retention: prompts and completions are never stored; only usage metering. |
| Support | Your Gigatokens contact, or gigatokens.ai. |
Harnesses and SDKs
Everything below was run end-to-end against this API with the official package, using only the base URL and a key (last verified 2026-09-28). Model ids are examples; any catalogue model works.
| Client / harness | Verified | What worked |
|---|---|---|
| OpenAI Python SDK openai 3.20 | yes | chat completions, streaming with usage, tool calling, JSON mode, /v1/key, /v1/usage |
| OpenAI Node SDK openai 5 | yes | chat completions, streaming with usage, tool calling |
| LangChain (Python, langchain-openai) langchain-openai 1.6 | yes | invoke, streaming, usage metadata |
| LangChain.js (@langchain/openai) @langchain/openai 1.6 | yes | invoke, streaming |
| LlamaIndex (OpenAILike) llama-index-llms-openai-like 0.8 | yes | chat, streaming chat |
| LiteLLM litellm 1.103 | yes | completion, streaming, usage |
| Pydantic AI pydantic-ai 2.51 | yes | agent run |
| Vercel AI SDK (@ai-sdk/openai-compatible) ai 5.0 / openai-compatible 1.0 | yes | generateText, streamText |
| OpenAI Agents SDK (Python) openai-agents 0.22 | yes | agent run, function tool call (chat-completions model object) |
| Aider aider-chat 0.86 | yes | non-interactive edit: created a file through the API (--message) |
| OpenAI Codex CLI codex-cli 0.158 | no | not natively: Codex 0.158+ speaks only the Responses API, which this API does not serve today (under evaluation) |
| Claude Code @anthropic-ai/claude-code | no | not natively: speaks the Anthropic Messages API, which this API does not serve today (under evaluation) |
OpenAI Python SDK
from openai import OpenAI
client = OpenAI(base_url="https://api.gigatokens.ai/v1", api_key="gt-...")
r = client.chat.completions.create(model="gigatokens/kimi-k3",
messages=[{"role": "user", "content": "Hello"}], max_tokens=400)
print(r.choices[0].message.content, r.usage)
OpenAI Node SDK
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.gigatokens.ai/v1", apiKey: process.env.GIGATOKENS_API_KEY });
const r = await client.chat.completions.create({ model: "gigatokens/kimi-k3",
messages: [{ role: "user", content: "Hello" }], max_tokens: 400 });
console.log(r.choices[0].message.content, r.usage);
LangChain (Python, langchain-openai)
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gigatokens/kimi-k3", base_url="https://api.gigatokens.ai/v1", api_key="gt-...", max_tokens=400)
print(llm.invoke("Hello").content)
LangChain.js (@langchain/openai)
import { ChatOpenAI } from "@langchain/openai";
const llm = new ChatOpenAI({ model: "gigatokens/kimi-k3", apiKey: process.env.GIGATOKENS_API_KEY,
configuration: { baseURL: "https://api.gigatokens.ai/v1" }, maxTokens: 400 });
console.log((await llm.invoke("Hello")).content);
LlamaIndex (OpenAILike)
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(model="gigatokens/kimi-k3", api_base="https://api.gigatokens.ai/v1", api_key="gt-...",
is_chat_model=True, max_tokens=400)
print(llm.complete("Hello"))
LiteLLM
Use the openai/ prefix so LiteLLM speaks the OpenAI format to the custom base URL.
import litellm
r = litellm.completion(model="openai/gigatokens/kimi-k3", api_base="https://api.gigatokens.ai/v1", api_key="gt-...",
messages=[{"role": "user", "content": "Hello"}], max_tokens=400)
print(r.choices[0].message.content)
Pydantic AI
from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIChatModel
from pydantic_ai.providers.openai import OpenAIProvider
model = OpenAIChatModel("gigatokens/kimi-k3", provider=OpenAIProvider(base_url="https://api.gigatokens.ai/v1", api_key="gt-..."))
print(Agent(model).run_sync("Hello").output)
Vercel AI SDK (@ai-sdk/openai-compatible)
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const gigatokens = createOpenAICompatible({ name: "gigatokens", baseURL: "https://api.gigatokens.ai/v1", apiKey: process.env.GIGATOKENS_API_KEY });
const { text } = await generateText({ model: gigatokens.chatModel("gigatokens/kimi-k3"), prompt: "Hello", maxOutputTokens: 400 });
OpenAI Agents SDK (Python)
Pass a model object, not a model string: the SDK reads the slash in gigatokens/... as a provider prefix.
from openai import AsyncOpenAI
from agents import Agent, OpenAIChatCompletionsModel, Runner, set_tracing_disabled
client = AsyncOpenAI(base_url="https://api.gigatokens.ai/v1", api_key="gt-...")
set_tracing_disabled(True) # tracing would call the OpenAI platform
llm = OpenAIChatCompletionsModel(model="gigatokens/kimi-k3", openai_client=client)
agent = Agent(name="assistant", instructions="Answer briefly.", model=llm)
print(Runner.run_sync(agent, "Hello").final_output)
Aider
Aider speaks to custom OpenAI-compatible endpoints through the openai/ model prefix. Aider needs Python 3.10-3.12.
aider --model openai/gigatokens/kimi-k3 \
--openai-api-base https://api.gigatokens.ai/v1 --openai-api-key gt-...
Desktop and IDE apps
These apps take an OpenAI-compatible base URL and key in their own settings: base URL https://api.gigatokens.ai/v1, your gt-… key, and a model id from the catalogue (gigatokens/kimi-k3 in the examples).
Cursor
Features that Cursor pins to its own models (for example Tab completion) keep using those; chat and composer use the model you added.
- Cursor Settings → Models. Under OpenAI API Key paste your
gt-…key. - Turn on Override OpenAI Base URL, enter
https://api.gigatokens.ai/v1and click Verify. - Add model →
gigatokens/kimi-k3(or any catalogue id) and select it in Chat / Composer.
Continue (VS Code, JetBrains)
- Open
~/.continue/config.yaml(Continue → gear icon → Open config) and add the model below. - Reload the window and pick Kimi K3 (Gigatokens) in the model dropdown.
name: Gigatokens
version: 0.0.1
schema: v1
models:
- name: Kimi K3 (Gigatokens)
provider: openai
model: gigatokens/kimi-k3
apiBase: https://api.gigatokens.ai/v1
apiKey: gt-...
roles: [chat, edit, apply]
Cline and Roo Code (VS Code)
- Extension settings → API Provider: OpenAI Compatible.
- Base URL
https://api.gigatokens.ai/v1· API Keygt-…· Model IDgigatokens/kimi-k3. - Leave Azure off and streaming on. If asked for a context window, use the catalogue value (1,048,576 for Kimi K3).
Zed
- Add the provider to
settings.jsonas below. - Agent panel → settings → Gigatokens → paste the
gt-…key when prompted.
{
"language_models": {
"openai_compatible": {
"Gigatokens": {
"api_url": "https://api.gigatokens.ai/v1",
"available_models": [
{ "name": "gigatokens/kimi-k3", "display_name": "Kimi K3 (Gigatokens)",
"max_tokens": 1048576, "max_output_tokens": 131072 }
]
}
}
},
"agent": { "default_model": { "provider": "Gigatokens", "model": "gigatokens/kimi-k3" } }
}
Open WebUI
- Start it with the two environment variables below; the catalogue appears in the model picker.
docker run -d -p 3000:8080 \
-e OPENAI_API_BASE_URL=https://api.gigatokens.ai/v1 \
-e OPENAI_API_KEY=gt-... \
ghcr.io/open-webui/open-webui:main
OpenCode run end-to-end 2026-09-28
- Add the provider below to
~/.config/opencode/opencode.json(oropencode.jsonin the project). No key in the file. - Store the key: run
opencode auth login, choose Other, enter provider idgigatokens, paste yourgt-…key. It is saved in~/.local/share/opencode/auth.json. - Run
opencodeand pick Kimi K3 (Gigatokens), or non-interactivelyopencode run --model gigatokens/gigatokens/kimi-k3 "…"(provider id, then the model id). - Terminal-only alternative to step 2: add
"apiKey": "{env:GIGATOKENS_API_KEY}"tooptionsand export the variable in the shell that starts OpenCode.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"gigatokens": {
"npm": "@ai-sdk/openai-compatible",
"name": "Gigatokens",
"options": {
"baseURL": "https://api.gigatokens.ai/v1"
},
"models": {
"gigatokens/kimi-k3": {
"name": "Kimi K3 (Gigatokens)"
},
"gigatokens/glm-5.3-flash": {
"name": "GLM 5.3 Flash (Gigatokens)"
}
}
}
},
"model": "gigatokens/gigatokens/kimi-k3"
}
If it fails
Error: Missing API key. Pass it as 'Authorization: Bearer gt-...'— OpenCode sent the request without a key: the environment variable did not reach the process (desktop and GUI apps do not inherit a shellexport). Useopencode auth loginas in step 2.Your API key does not have access to the requested model— the key is restricted to other models. Check the key's Models column in the console and use one of those, or create a key with no model restriction.
Aider run end-to-end 2026-09-28
- Pass the base URL and key on the command line (or set
OPENAI_API_BASE/OPENAI_API_KEY) and use theopenai/prefix on the model id.
aider --model openai/gigatokens/kimi-k3 --openai-api-base https://api.gigatokens.ai/v1 --openai-api-key gt-...
Codex CLI and Claude Code use other wire formats (OpenAI Responses API, Anthropic Messages API); support for them is under evaluation.