Kiln docs
Kiln API — AI inference you call with the OpenAI SDK
Call AI models with the OpenAI SDK. Set base_url and an API key to start.
Point your OpenAI SDK at Kiln.
Point base_url at Kiln and use an API key that starts with sk-bk-…. Put your key in the examples below, then run them. Some parameters are not supported yet; see Known limitations in the API reference.
curl https://api.bricksum.com/v1/chat/completions \
-H "Authorization: Bearer sk-bk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-32b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.bricksum.com/v1",
api_key="sk-bk-...", # your Kiln API key
)
resp = client.chat.completions.create(
model="qwen3-32b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.bricksum.com/v1",
apiKey: process.env.KILN_API_KEY, // sk-bk-...
});
const resp = await client.chat.completions.create({
model: "qwen3-32b",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);Up and running in 5 minutes
- Create an API key in the console
- Set base_url to https://api.bricksum.com/v1
- Send a first request and read usage in the response
Quickstart
A step-by-step walkthrough from creating an API key to your first API request.
Quickstart →
API Reference
The hub of the API reference: base URL, authentication, the endpoints (Chat Completions, Completions, Responses, Messages, models, key), the parameters they share, the response envelope, streaming, errors and limits.
Explore the API →
Models
How to list the models you can call through the API, and the context length, pricing and capabilities of each one.
Pick a model →
Usage & billing
The usage object and usage.cost, how cost is computed, the generation ID header, checking your key, and what is billed.
Check your costs →
Using an AI coding assistant?
/llms.txt is a machine-readable index of every page here. Give it to Claude Code or Cursor so the agent can read these docs while it sets up Kiln.