Integrations
Anything with an OpenAI-compatible or Anthropic-compatible client can call Kiln: set the base URL to https://api.bricksum.com/v1 and pass your sk-bk- key. One page per SDK below, each with a snippet that has been run against the API, then the coding tools.
SDKs
Each page is short on purpose: what to install, one call that has been run against the API, and the two or three things that differ on Kiln. Everything the SDKs share is on the API reference instead of on five pages at once.
Coding tools
Claude Code, Codex CLI, Hermes Agent, OpenCode, OpenClaw and Cursor each connect with a short config change. The snippets are on this page; after you sign in, Console → Tools shows the same snippets. The agent modes of these tools rely on the automatic tool choice described above.
Claude Code
Claude Code speaks the Anthropic Messages API, which Kiln serves directly, so you need no router. Set ANTHROPIC_BASE_URL to the Kiln API origin, put your Kiln key in ANTHROPIC_AUTH_TOKEN, and point ANTHROPIC_MODEL and every ANTHROPIC_DEFAULT_*_MODEL slot at Kiln's model ID.
# Claude Code connects to Kiln directly — Kiln serves the Anthropic Messages API.
# Put these in your shell profile (or a direnv file); never commit the key.
export ANTHROPIC_BASE_URL="https://api.bricksum.com"
export ANTHROPIC_AUTH_TOKEN="sk-bk-..." # your Kiln API key
# Claude Code picks a model per task slot — point every slot at Kiln's model.
export ANTHROPIC_MODEL="qwen3-32b"
export ANTHROPIC_DEFAULT_OPUS_MODEL="qwen3-32b"
export ANTHROPIC_DEFAULT_SONNET_MODEL="qwen3-32b"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="qwen3-32b"
# Claude Code does not know this model, so it assumes a 200k context window and
# lets the session grow past what the upstream accepts. Tell it the real one —
# its own system prompt and tools take a large share of it, so it compacts early.
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=32768
claudeLast checked against Claude Code's documentation on .
Codex CLI
Codex CLI reads this provider block from ~/.codex/config.toml and talks to Kiln over the Responses API (wire_api = "responses"). Set KILN_API_KEY in the shell before starting Codex, then keep the model ID aligned with Kiln's catalog.
model = "qwen3-32b"
model_provider = "kiln"
# The model's real window; Codex's own prompt and tools take a large share of it.
model_context_window = 32768
[model_providers.kiln]
name = "Kiln"
base_url = "https://api.bricksum.com/v1"
env_key = "KILN_API_KEY"
# Codex speaks the Responses API (Kiln serves POST /v1/responses); "chat" is gone.
wire_api = "responses"# Set this in your shell profile, never commit it.
export KILN_API_KEY="sk-bk-..."
codexLast checked against Codex CLI's documentation on .
Hermes Agent
Hermes Agent has a custom provider path for OpenAI-compatible endpoints. Save the endpoint and model in config.yaml and provide the key as OPENAI_API_KEY; Hermes keeps that endpoint configuration across sessions.
model:
provider: custom
default: qwen3-32b
base_url: https://api.bricksum.com/v1# Set this in your shell profile, never commit it.
export OPENAI_API_KEY="sk-bk-..."
# Start Hermes, then send a short test prompt.
hermesLast checked against Hermes Agent's documentation on .
OpenCode
OpenCode uses the OpenAI-compatible provider package in opencode.json. The same provider configuration can be used from its terminal and desktop workflows.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"kiln": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kiln",
"options": {
"baseURL": "https://api.bricksum.com/v1",
"apiKey": "{env:KILN_API_KEY}"
},
"models": {
"qwen3-32b": {
"name": "qwen3-32b",
"limit": { "context": 32768, "output": 8192 }
}
}
}
}
}# Set this in your shell profile, never commit it.
export KILN_API_KEY="sk-bk-..."
opencodeLast checked against OpenCode's documentation on .
OpenClaw
OpenClaw accepts custom providers under models.providers. Kiln uses the openai-completions adapter; declare the model once, then select it as kiln/qwen3-32b for the agent default.
{
"models": {
"mode": "merge",
"providers": {
"kiln": {
"baseUrl": "https://api.bricksum.com/v1",
"apiKey": "${KILN_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "qwen3-32b",
"name": "qwen3-32b",
"contextWindow": 32768
}
]
}
}
},
"agents": {
"defaults": { "model": { "primary": "kiln/qwen3-32b" } }
}
}# Set this in your shell profile, never commit it.
export KILN_API_KEY="sk-bk-..."Last checked against OpenClaw's documentation on .
Cursor
In Cursor Settings → Models, enter the Kiln key, enable Override OpenAI Base URL, then add and select the exact Kiln model ID.
Cursor → Settings → Models
1. Paste your Kiln API key (sk-bk-...) into "OpenAI API Key"
2. Enable "Override OpenAI Base URL"
→ https://api.bricksum.com/v1
3. Add qwen3-32b to the model list and select itLast checked against Cursor's documentation on .
Cookbook
End-to-end recipes that put these integrations to work, such as a streaming chat CLI, are in the Cookbook →