API keys
Created by a person, shown once, and unable to create another.
Keys belong to an account and are created in the Console. The plaintext secret is returned exactly once, in the response to the request that created it.
A key cannot mint a key
Key management is session-only, enforced at the door. A leaked key therefore cannot bootstrap a stronger one — which is also why there is no programmatic way to complete a first integration without a human sign-in.
Make a request
Send a request to https://api.tessen.ai/v1/chat/completions with your key as a Bearer token.
curl https://api.tessen.ai/v1/chat/completions \
-H "Authorization: Bearer $TESSEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "z1", "max_tokens": 256,
"messages": [{"role": "user", "content": "Reply with the single word: ok"}]}'Which models
| Model | Who can use it | Billing |
|---|---|---|
| z1, z1-code, h1 | Accounts enrolled in the commercial pilot | Prepaid wallet, at the published USD rate per 1M tokens (Models & Intelligence in the Console). |
| project-zero | Developers enrolled in ZERO | Free daily allowance. Never debits the wallet and never falls back to paid inference. |
A model your account is not entitled to is refused; it is never served by a different model. Availability is shown per account in the Console.
Streaming, usage and cost
curl -N https://api.tessen.ai/v1/chat/completions \
-H "Authorization: Bearer $TESSEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "z1", "stream": true, "stream_options": {"include_usage": true}, "max_tokens": 256,
"messages": [{"role": "user", "content": "Say hello in five words."}]}'With include_usage the last data frame before [DONE] carries the token counts. For the commercial families it also carries cost_usd, the amount settled against your wallet.
Errors
| Status · code | Meaning |
|---|---|
| 401 | The key is missing, invalid or revoked. |
| 402 · insufficient_credits | The wallet cannot cover the request. Nothing was charged. |
| 403 · zero_entitlement_required | The account is not enrolled for that program. |
| 400 · model_not_found | That model is not available to this account. |
| 400 · reasoning_budget_exhausted | A reasoning model spent its whole max_tokens thinking before it wrote an answer. Raise max_tokens and retry. |
| 429 | A limit was reached. The response names which and carries Retry-After; per-minute limits clear in the next minute, daily limits at 00:00 UTC. |