NexKit AI · API

The API

One base URL, one nk_live_* key, and the three request shapes coding agents already speak. There is no NexKit SDK to install, because the whole point is that you do not need one.

4endpoints, all of them1base URL0SDKs to install
01Base URL

One host, every surface.

The same origin serves all four endpoints and both providers. There is one host to allow through a proxy and one key to rotate.

base url
https://api.nexkit.uk/v1
authorization header
Authorization: Bearer nk_live_YOUR_KEY

Claude Code is the exception worth knowing. It appends its own path, so ANTHROPIC_BASE_URL is set to https://api.nexkit.uk with no /v1 suffix. Everything else takes the base URL above.

02Endpoints4, and no others

What NexKit serves.

Each one is the dialect a client already speaks, translated to whatever the provider you named actually accepts. Nothing on this list is planned, deprecated or partial.

EndpointShapeSpoken byWhat it does
POST /v1/chat/completionsOpenAI Chat Completionscurl, the OpenAI SDKs, anything OpenAI-shapedThe baseline. Streaming and non-streaming, tools, and JSON mode, forwarded to the provider that owns the model you named.
POST /v1/responsesOpenAI ResponsesCodexWhat Codex talks when wire_api = "responses" is set. Translated into the provider’s chat/completions call and back, tool calls included.
POST /v1/messagesAnthropic MessagesClaude CodeWhat Claude Code talks. Full Anthropic↔OpenAI translation, tool_use and tool_result blocks included, so a tool loop survives the round trip.
GET /v1/modelsOpenAI Modelsclients that enumerate on startupWhat your key can actually reach — filtered by the provider credentials you have attached, so it never lists a model that would then fail to run.

Key and credential management is not an API. Minting a key, attaching a provider credential and reading your usage all happen in the dashboard. Those routes exist, but they authenticate as NexKit rather than as you, so there is nothing here you could call.

03A first call

The smallest request that proves everything.

Your key, your provider credential, the routing and the translation — all four are exercised by this one command.

curl
curl https://api.nexkit.uk/v1/chat/completions \
  -H "Authorization: Bearer nk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Say NEXKIT"}]}'

GET /v1/models answers 200 with an empty list when no provider credential is attached. That is the correct answer rather than a fault: a key alone reaches nothing, because NexKit never fronts the tokens.

04Errors

What goes wrong, and what it means.

NexKit classifies failures itself and never forwards a provider's wording, so these are the strings you can actually be shown.

You seeBecauseFix
401 · invalid_api_keyThe NexKit key is wrong, revoked, or not being sent.Check the key is the one you copied at mint time — it is shown once and cannot be shown again. If you lost it, revoke it and create another.
412 · byok_missingThe key is valid, but this account has no credential attached for the provider that owns the model you named.Connect DeepSeek or Qwen on the Providers screen, then try again.
404 · model_not_foundThe model id does not exist, or is retired. `deepseek-chat` and `deepseek-reasoner` were disabled upstream and never resolve.The error names what is available. Or run the models check above to list exactly what your key can reach.
200, but the model list is emptyA valid key with no provider credential attached. This is a correct answer, not a fault.Attach a provider credential. A key alone reaches nothing — NexKit never fronts the tokens.
404 on every request, path looks doubled`ANTHROPIC_BASE_URL` was set with a `/v1` suffix. Claude Code appends its own path, so the request goes to `/v1/v1/messages`.Set the base URL with no path at all.
Codex ignores the key, or asks you to log in`wire_api` or `requires_openai_auth` is missing from the provider block.Both lines are in the config above. Without them Codex uses the wrong surface, or expects an OpenAI login instead of your key.
05What is recorded

Counts, timings and identifiers. Never content.

This is a hard line rather than a setting, and it is why Usage and Logs cannot show you the text of a request even when you would like them to.

No prompt, no completion, no system prompt, no tool-call argument or result, no nk_live_* key and no provider key is ever written down. What is recorded is the model, the endpoint, token counts, latency, an outcome and a request id — which is what makes a failure findable across every hop without keeping anybody’s code.

Logs are kept for 30 days and then deleted. Usage is aggregated and kept, because counting what you spent is the thing it is for.

Point something at it.

Create a key, attach your own provider credential, and send the curl above. Nothing on that path asks for a card.