Navon Cloud serves open-weight models behind one API that speaks both the OpenAI and the Anthropic formats. This is the reference for using it: signing up, calling the API, keys, billing, errors, and what we record. Looking for colocation instead? See Modular colocation.
You manage your account in the console at cloud.navon.africa. Your code calls the API at https://api.navon.africa/v1.
NAVON_API_KEY and send a request.curl https://api.navon.africa/v1/chat/completions \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/v4-flash",
"messages": [{"role": "user", "content": "Hello"}]
}' The answer is a standard chat completion. It also carries a navon object saying where the request ran and whether its content was kept, and a usage object with the tokens you are billed for.
The request and response bodies match OpenAI's and Anthropic's, error bodies included, so an existing client works once you change the base URL and the key. Send the key as Authorization: Bearer or as x-api-key. Navon's own fields sit under metadata in a request and under navon in a response, so a strict client never meets a field it does not know.
| Endpoint | What it does |
|---|---|
POST /v1/chat/completions | OpenAI chat completions. Streams when stream is true. |
POST /v1/responsesGET /v1/responses/{id} | OpenAI responses. The only surface for long-running work: send background: true and poll. |
POST /v1/messagesPOST /v1/messages/count_tokens | Anthropic messages. The token count is an estimate; billing always uses the model's own count. |
POST /v1/embeddings | Text to vectors, up to 2,048 inputs per request, at the model's full width. |
GET /v1/models | The models this key may use. See models. |
POST /v1/filesGET /v1/files/{id}GET /v1/files/{id}/content | Upload a JSONL file of requests for a batch, and read its results. |
POST /v1/batchesGET /v1/batchesGET /v1/batches/{id}POST /v1/batches/{id}/cancel | Run an uploaded file within a day, at the lowest price. |
POST /v1/tasksGET /v1/tasksGET /v1/tasks/{id}POST /v1/tasks/{id}/finishPOST /v1/tasks/{id}/agentsPOST /v1/tasks/{id}/eventsPOST /v1/agents/{id}/stepsPOST /v1/steps/{id}/finish | Tracing: a record of what an agent did, in order, and what it cost. |
POST /v1/usage/events | For other Navon services that meter something you pay for, such as storage. A project API key cannot use it. |
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.navon.africa/v1", api_key=os.environ["NAVON_API_KEY"])
reply = client.chat.completions.create(
model="deepseek/v4-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content) import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ baseURL: "https://api.navon.africa", apiKey: process.env.NAVON_API_KEY });
const message = await client.messages.create({
model: "deepseek/v4-flash",
max_tokens: 256,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content[0].text); Or without an SDK:
curl https://api.navon.africa/v1/messages \
-H "x-api-key: $NAVON_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/v4-flash",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello"}]
}' Every request is served in a completion window. asap is the default: the interactive lane. flex is the same model and the same answer, queued, at a lower price. Ask for it with service_tier: "flex" or metadata.completion_window: "flex", on a background response or a batch only. Sent to a surface that holds a connection open, it is refused with flex_requires_background rather than quietly served at the other price.
curl https://api.navon.africa/v1/responses \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/v4-flash",
"input": "Summarise the attached minutes.",
"background": true,
"service_tier": "flex"
}'
# then poll: curl https://api.navon.africa/v1/responses/$RESPONSE_ID -H "Authorization: Bearer $NAVON_API_KEY" Closing the connection does not cancel a background request. Keep polling rather than sending it again, or the work runs and bills twice. To be told when it finishes, add metadata.completion_webhook (an https address) and metadata.webhook_token; the delivery is signed to the Standard Webhooks specification.
Upload a JSONL file with one chat completion request per line, then run it. A file can hold 50,000 lines and 200 MB. Every line is checked during the upload, and one bad line refuses the whole file, naming the line. Results can be read while the batch is still running: pass the X-Last-Line header of one page as the offset of the next, and stop when X-Incomplete is false.
# requests.jsonl: one chat completion request per line
# {"custom_id":"q1","method":"POST","url":"/v1/chat/completions","body":{"model":"deepseek/v4-flash","messages":[{"role":"user","content":"Label this: great service"}]}}
curl https://api.navon.africa/v1/files \
-H "Authorization: Bearer $NAVON_API_KEY" \
-F purpose=batch -F [email protected]
curl https://api.navon.africa/v1/batches \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_file_id": "'$FILE_ID'", "endpoint": "/v1/chat/completions", "completion_window": "24h"}'
curl https://api.navon.africa/v1/batches/$BATCH_ID \
-H "Authorization: Bearer $NAVON_API_KEY"
curl "https://api.navon.africa/v1/files/$OUTPUT_FILE_ID/content?offset=0" \
-H "Authorization: Bearer $NAVON_API_KEY" Cancelling stops every line that has not started. A line already running finishes and is billed, because its tokens are produced either way. Revoking the key that created a batch cancels it too.
curl https://api.navon.africa/v1/embeddings \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "baai/bge-m3", "input": ["Habari ya asubuhi", "Good morning"]}' Embedding inputs are never kept, whatever the project's retention setting, because they are usually your documents.
A task records what an agent did and what it cost: its participants, steps, tool calls and token counts, never its prompts or answers. Open a task and send its id in the navon-task header. The gateway records every model call made under it, so your code passes nothing else, and the token counts in the record are the ones on your invoice. Add participants with POST /v1/tasks/{id}/agents, steps with POST /v1/agents/{id}/steps, and tool calls, decisions and notes with POST /v1/tasks/{id}/events.
# open a task, then send its id with every model call made for it
curl https://api.navon.africa/v1/tasks \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Mark one script"}'
curl https://api.navon.africa/v1/chat/completions \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "navon-task: $TASK_ID" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek/v4-flash", "messages": [{"role": "user", "content": "Mark this answer"}]}'
curl https://api.navon.africa/v1/tasks/$TASK_ID/finish \
-H "Authorization: Bearer $NAVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "succeeded"}'
# the whole record: agents, steps, events, tokens
curl https://api.navon.africa/v1/tasks/$TASK_ID \
-H "Authorization: Bearer $NAVON_API_KEY" GET /v1/models answers for the key that asks. A project's residency policy can rule out models, so a model missing from the list may still be one we serve; it is one this project may not use.
curl https://api.navon.africa/v1/models \
-H "Authorization: Bearer $NAVON_API_KEY" Each model lists its id, display_name, context_length and what it supports (chat or embeddings; embedding models also give their dimensions). Under navon it gives the route it runs on and its licence as an SPDX identifier, or the name of the model's own licence where there is no SPDX one.
Every model we serve is open-weight, and its licence is the model maker's, not ours. Most are permissive, such as MIT or Apache 2.0, but some carry conditions of their own, such as attribution or limits on use. Read the licence before you build a product on a model. The Models page in the console shows each licence and price, and lets you ask for a model we do not serve yet.
An API key belongs to a project, never to a person, so production keeps working when somebody leaves. Keys begin nvn_live_, and the console shows the first few characters after that so you can tell keys apart. The secret is shown once, when it is created; we store only a hash and cannot show it again. Revoke a key in the console at any time. A key can also carry its own spend cap.
People hold a role in each project.
| Role | Can |
|---|---|
| Owner | Everything, including making someone else an owner. |
| Admin | Invite and remove people and change their roles (except owner), manage keys and the project's policies, read and delete kept content, manage departments and apps, see usage and billing, call models. |
| Member | Create and revoke keys, see usage and policies, call models. |
| Billing | See usage, read and manage billing. Cannot call models or touch keys, so a finance officer can reconcile a bill without being able to spend against it. |
| Read only | See the project, its usage and its policies, and call models. Read only means it cannot change settings. |
You pay for what you use, by the token, at each model's price. Every response carries a usage object with input_tokens, cached_input_tokens (part of the input, not added to it) and output_tokens, and those are the numbers you are billed on. Embeddings are billed as input tokens. Flex and batch work costs less than the interactive lane.
Your organisation spends from a prepaid balance. When it runs out, requests are refused with 402 and credit_exhausted; nothing is charged for a refused request, and requests resume as soon as credit is added. To add credit, contact us from Support in the console.
Caps can be set on a key, on a department and on the whole account. A request that would pass one is refused with 403 and spend_cap_reached, and the message says whose cap it is and who can lift it.
The console's Usage page shows spend per day and by model, and the Invoices page holds your invoices. Usage is recorded in an append-only ledger as each request finishes; spend figures are totalled daily.
Errors have the same shape as OpenAI's: error.type, error.message, which says what went wrong and how to fix it, and error.code, which is stable and safe to switch on.
| Status | Code | Meaning |
|---|---|---|
| 400 | flex_requires_background and others | The request is malformed or asks for a combination we refuse. The message names the fix. |
| 401 | invalid_api_key | The key is missing, malformed or revoked. |
| 402 | credit_exhausted | Your prepaid balance is empty. Retrying will not help; adding credit will. |
| 403 | spend_cap_reached, route_not_permitted, model_not_permitted | A cap or a project policy stops this request. |
| 404 | model_not_found and others | No such object, or not one this key can see. |
| 429 | organisation_rate_limited | Your organisation's request rate for this model is used up. Wait for Retry-After seconds, or ask an owner to raise the limit. |
| 529 | model_saturated | The model is at capacity across every customer. Nothing in your request caused it. Wait for Retry-After seconds, or use the flex window, which queues instead of failing. |
429 and 529 are separate on purpose: a 429 is about your usage and you can act on it, a 529 is about ours. To retry safely, send an Idempotency-Key header. A retry with the same key replays the original request instead of running it again, and a request refused by a rate limit does not use the key up.
Changes to your account are written to an audit trail: keys created and revoked, people invited and roles changed, policies and retention settings changed, kept content read or deleted, invoices issued. Each entry says who acted, on what, when, and whether it was allowed.
Every connection to Navon from a modern client is protected with post-quantum key exchange, live now rather than on a roadmap. The urgent quantum threat is harvest now, decrypt later: traffic recorded today and decrypted once a large quantum computer exists. A prompt a ministry or a bank sends today may still be sensitive in ten years, so it is protected today.
| What | Protection | Status |
|---|---|---|
| Your connection to the console and the API | Hybrid X25519 + ML-KEM-768 (NIST FIPS 203), TLS 1.3 | Live |
| Our edge to our servers | Hybrid X25519 + ML-KEM-768 | Live |
| Our servers to the services they call | Hybrid X25519 + ML-KEM-768, wherever the other side supports it | Live |
| Operator access to servers | Hybrid sntrup761 + X25519 SSH key exchange | Live |
| Stored secrets and encrypted backups | AES-256, which stays at 128-bit strength against a quantum computer | Live |
| Passwords, API keys and webhook signatures | scrypt, SHA-256 and HMAC, which quantum computers do not meaningfully weaken | Live |
| Audit trail signatures | ML-DSA-65 (NIST FIPS 204), with older records sealed under ML-DSA | Live |
| Old protocol versions | TLS 1.0 and 1.1 refused on every Navon address | Live |
| Website certificates | Classical, like every public website today | Waiting on the industry |
Our choices follow the UK National Cyber Security Centre's post-quantum guidance: ML-KEM-768 for key exchange and ML-DSA-65 for signatures, the parameter sets it recommends for most uses, and X25519MLKEM768, its first-preference key exchange for TLS 1.3. Key exchange is hybrid, combining post-quantum with a proven classical method, which the NCSC recommends as the interim step; signatures move straight to ML-DSA, as the NCSC prefers. The NCSC asks organisations to finish their most important migrations by 2031 and everything by 2035. Every TLS 1.3 connection a customer makes to Navon is already there.
Every signature and every encrypted value Navon stores records the algorithm that produced it. Moving to a newer algorithm is a background job, not an outage, and old records stay readable throughout. ML-KEM and ML-DSA are today's standards, not the last ones.
Nothing to configure. Current versions of Chrome, Edge, Firefox and Safari negotiate post-quantum key exchange automatically, as do clients built on OpenSSL 3.5 or later (including Node.js 24 and later) and Go 1.24 or later. A client limited to TLS 1.2 still connects, so older tools keep working, but TLS 1.2 cannot carry post-quantum key exchange and that connection is protected only classically. Use TLS 1.3. TLS 1.0 and 1.1 are refused.
No public certificate authority can yet issue a post-quantum website certificate, so the certificate that proves a server is ours is still classical, everywhere on the web. That protects against impersonation at the moment of connection; it does not expose recorded traffic later. We will move as soon as browsers trust post-quantum certificates, which Chrome currently expects from 2027.
With OpenSSL 3.5 or later:
openssl s_client -connect cloud.navon.africa:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep "Negotiated TLS1.3 group" The answer should be Negotiated TLS1.3 group: X25519MLKEM768.
We run this check ourselves on the 1st of every month: post-quantum key exchange on TLS 1.3, TLS 1.0 and 1.1 refused, and ML-DSA-65 signing working. A failure alerts the team.
The design target is inference on hardware Navon operates inside the customer's own jurisdiction, starting in Kenya. The private pilot is not there yet: it runs on a GPU rig in Doha, Qatar. If your data must stay in your country, the pilot does not meet that requirement today, and we will say plainly when that changes.
Every response names the route it ran on in navon.route. navon is hardware Navon operates. partner and brokered are routes through other providers, used while we build and removed once our own capacity is live. A project's residency policy can allow Navon hardware only; a model on another route is then refused with 403 and route_not_permitted, and the request is never moved to another route without telling you.
navon.retained.Agents will be able to sign in to Navon in their own right, separately from the people who run them. This section is written when that ships. Until then, give an agent a project API key and record its work with tracing.