Docs
API documentation
TokenKiln serves open-weight models through an OpenAI-compatible API. Point your existing SDK at a new base URL, swap the key, and keep the rest of your code.
Quickstart
Create a key on the API keys page, then send your first request. The base URL is:
https://tokenkiln.com/api/v1
curl https://tokenkiln.com/api/v1/chat/completions \
-H "Authorization: Bearer tk_..." \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-7B-Instruct",
"messages": [{"role": "user", "content": "Hello!"}]
}'The model field picks any model from the catalog per request. One key works for all of them.
OpenAI compatibility
- Official OpenAI SDKs (Python, JavaScript, and anything else that accepts a
base_url) work unchanged, including streaming, typed errors, files, and batches. - Parameters beyond the ones the gateway meters (
model,messages,max_tokens,stream) pass through to the inference engine:temperature,top_p,stop,seed, and friends. - Every response carries an
x-request-idheader that matches the Activity page, so a support question is one id, not a timestamp hunt.
Privacy
API traffic is proxied to the GPU and never written to our database. Prompts and completions are not stored, not logged, and not read; we bill on token counts alone. Transport is encrypted end to end, including the hop from the gateway to the GPU. The full statement lives on the privacy page.
Go deeper
Building in a browser? The API sends CORS headers on every
/api/v1 route. See Authentication for what that means for key handling.