NexKit AI · Codex
Codex, on the model you choose
Codex is built for OpenAI’s Responses API. NexKit serves that surface and translates it to whatever DeepSeek or Qwen actually accept — so Codex keeps its own configuration file and its own wire protocol, and the tokens are spent on your provider account.
What Codex needs.
This is the block the smoke test itself writes — the one that drove a real Codex against a real provider. Replace the key with the one you mint, and the model id with any from the catalogue.
model = "deepseek-v4-flash"
model_provider = "nexkit"
[model_providers.nexkit]
name = "NexKit"
base_url = "https://api.nexkit.uk/v1"
env_key = "NEXKIT_API_KEY"
wire_api = "responses"
requires_openai_auth = falseexport NEXKIT_API_KEY="nk_live_YOUR_KEY"wire_api = "responses" and requires_openai_auth = false are both load-bearing. Without the first, Codex talks /v1/chat/completions — a different surface, reached by a different translation. Without the second, it expects an OpenAI login and never reads env_key at all. Both lines are in the block above.
One id, and the client never knows.
Everything else stays exactly as it is. Moving Codex from DeepSeek to Qwen is a one-line edit — provided you have attached a credential for the provider that owns the id.
| To run on | Set the model to | You need |
|---|---|---|
| DeepSeek | deepseek-v4-flash | A DeepSeek key, attached to your account |
| Alibaba Model Studio (Qwen) | qwen3.8-max | An Alibaba Model Studio key, attached to your account |
A key on its own reaches nothing. NexKit never fronts the tokens, so until a provider credential is attached, GET /v1/models answers 200 with an empty list and a request answers 412 · byok_missing. Both are correct answers rather than faults.
Prove the chain with curl first.
If this works and the client does not, the problem is in the client's configuration rather than in your key, your credential or the gateway — which is most of the debugging done in one command.
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"}]}'The base URL is https://api.nexkit.uk for every surface and every provider. There is one host to allow through a proxy, and one key to rotate.
Run Codex on your own provider account.
Create a key, attach DeepSeek or Qwen, and paste the block above. The step-by-step version, with the errors this path actually produces, is in the Codex guide.