Documentation
WebikAI Inference is a provider-only API serving one open-weight model, kwaipilot/kat-coder-v2.5-dev, behind the standard OpenAI Chat Completions surface at https://api.webik.ai/v1. Authenticate with a bearer key (wk_live_...). Every
response names the immutable release that served it.
Quickstart
Stock OpenAI SDKs work unmodified — set base_url, nothing else. There is no WebikAI
SDK to install and no custom client to maintain.
curl https://api.webik.ai/v1/chat/completions \
-H "Authorization: Bearer wk_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "kwaipilot/kat-coder-v2.5-dev",
"messages": [{"role": "user", "content": "Write a binary search in Rust"}]
}'from openai import OpenAI
client = OpenAI(base_url="https://api.webik.ai/v1", api_key="wk_live_...")
completion = client.chat.completions.create(
model="kwaipilot/kat-coder-v2.5-dev",
messages=[{"role": "user", "content": "Write a binary search in Rust"}],
)
print(completion.choices[0].message.content)
print(completion.system_fingerprint) # wbk_... — the exact serving releaseimport OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.webik.ai/v1',
apiKey: 'wk_live_...'
});
const completion = await client.chat.completions.create({
model: 'kwaipilot/kat-coder-v2.5-dev',
messages: [{ role: 'user', content: 'Write a binary search in Rust' }]
});
console.log(completion.choices[0].message.content);Models and releases
Three layers of identity, from stable to exact:
- Canonical ID —
kwaipilot/kat-coder-v2.5-dev, the name you request. Points at the current stable release. - Release ID — an immutable, dated build, e.g.
webik/kat-coder-v2.5-dev-2026-08-w4a16-r1(an example of the form). Fixes weights, quantization, engine, chat template, tool parser, and context configuration. - Fingerprint —
system_fingerprint(wbk_+ 12 hex) on every response, unique per release; theX-Webik-Model-Releaseheader carries the full release ID alongside it.
GET /v1/models lists the canonical ID; GET /v1/model-releases lists releases
with their status, dates, and any deprecation schedule:
curl https://api.webik.ai/v1/models -H "Authorization: Bearer wk_live_..."
curl https://api.webik.ai/v1/model-releases -H "Authorization: Bearer wk_live_..."Pin a release either way — the response echoes exactly the model string you sent:
// Pin by sending the release ID as the model:
{ "model": "webik/kat-coder-v2.5-dev-2026-08-w4a16-r1", "messages": [ ... ] }
// Or keep the canonical ID and pin via the webik.release extension:
{
"model": "kwaipilot/kat-coder-v2.5-dev",
"webik": { "release": "webik/kat-coder-v2.5-dev-2026-08-w4a16-r1" },
"messages": [ ... ]
}Full release semantics and the deprecation policy (90-day overlap, 30-day notice, Deprecation/Sunset headers) live on the model page.
Streaming
Set stream: true for server-sent events. Ask for stream_options.include_usage and the final chunk carries the same engine-reported usage
billing settles from — your numbers and our numbers are the same numbers.
stream = client.chat.completions.create(
model="kwaipilot/kat-coder-v2.5-dev",
messages=[{"role": "user", "content": "..."}],
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
if chunk.usage: # final chunk — what billing settles from
print(chunk.usage)Tool calling
The standard tools array and tool_choice parameter work as documented by
OpenAI. KAT-Coder is trained for agentic tool use; parallel tool calls are supported, and tool-call
parsing is part of the release contract — a parser change mints a new release, so an agent that works
today cannot silently break tomorrow.
{
"model": "kwaipilot/kat-coder-v2.5-dev",
"messages": [{"role": "user", "content": "Run the failing test, then fix it"}],
"tools": [{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the project test suite",
"parameters": {
"type": "object",
"properties": {"filter": {"type": "string"}}
}
}
}]
}Structured output
response_format supports json_object (any valid JSON) and json_schema (constrained decoding against your schema):
{
"model": "kwaipilot/kat-coder-v2.5-dev",
"messages": [{"role": "user", "content": "Extract the dependencies from this Cargo.toml"}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "dependencies",
"strict": true,
"schema": {
"type": "object",
"properties": {
"dependencies": {"type": "array", "items": {"type": "string"}}
},
"required": ["dependencies"]
}
}
}
}Reasoning effort
reasoning_effort accepts none, medium, or high and controls how much the model deliberates before answering. Both forms below are
Webik extensions resolved at the edge and stripped before the request reaches the engine — the engine
never sees a foreign field.
// OpenAI-style top-level parameter:
{ "model": "kwaipilot/kat-coder-v2.5-dev", "reasoning_effort": "high", "messages": [ ... ] }
// Equivalent nested form for clients that reject unknown top-level fields:
{ "model": "kwaipilot/kat-coder-v2.5-dev", "webik": { "mode": "high" }, "messages": [ ... ] }Errors
Errors use the OpenAI envelope with a stable machine code in error.code. Capacity
errors (429) carry retry_after_seconds in the body and never debit the wallet — a failed request costs nothing. Match on error.code, not the HTTP status: capacity refusals share 429 with rate_limit_exceeded.
| Code | HTTP | Retryable | Meaning |
|---|---|---|---|
| invalid_api_key | 401 | no | The key is missing, malformed, or revoked. Mint a new one. |
| insufficient_balance | 402 | no | The wallet cannot cover the request reservation. Top up and retry. |
| spend_limit_exceeded | 402 | no | A spend limit you configured on the key or account blocks the request. |
| rate_limit_exceeded | 429 | yes | Too many requests or tokens in the window. Back off and honor Retry-After. |
| model_release_not_found | 404 | no | Unknown model or release ID. List valid IDs with GET /v1/model-releases. |
| model_release_deprecated | 410 | no | The pinned release is past its sunset date. Move to a current release. |
| capacity_starting | 429 | yes | Capacity is cold-starting. Retry after retry_after_seconds. Never debits. |
| capacity_temporarily_unavailable | 429 | yes | No capacity right now. Retry with backoff. Never debits. |
| request_unprofitable_at_current_price | 429 | no | Serving this request now would cost more than the published price allows us to charge. Nothing is charged. |
| provider_internal_error | 502 | yes | The serving backend failed. Nothing is charged. |
| usage_unavailable | 502 | yes | The engine returned no usage accounting, so the request fails and is not charged. |
| invalid_request | 400 | no | The request body is malformed or uses unsupported parameters. |
Billing
Billing is a prepaid wallet ($20 minimum top-up via Stripe Checkout). Before dispatch, a conservative reservation is held against your balance; after the response, the request settles to engine-reported usage at $1.00 per 1M input and $4.00 per 1M output tokens (introductory), and the unused remainder is released. A small dynamic minimum request fee covers cold starts. The price version in force is recorded on every usage row, and your history is exportable as CSV.
Data handling
No prompt or response body storage by default. Request logs are metadata only: timestamps, token counts, release ID, price version, status, and request ID. Bodies pass through to the inference engine and are not persisted by WebikAI. Details in the privacy policy.
Use it from your tools
Anything that speaks the OpenAI API can point at https://api.webik.ai/v1. Setup guides for the
coding agents the beta targets: