Docs

Build on Navon Cloud.

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.

Get started · 01

Getting started.

You manage your account in the console at cloud.navon.africa. Your code calls the API at https://api.navon.africa/v1.

  1. Get an invitation. Sign-up is by invitation only, and invitations come from people already on Navon. They send you a single-use link from the Invite page in the console. It lasts 14 days and opens the sign-up page with your address filled in. Confirm your address from the email that follows.
  2. Your organisation and first project. Signing up creates an organisation and its first project, with you as owner of both. A new organisation starts with no prepaid credit, so you can look around, but model calls are refused until credit is added. See usage and billing.
  3. Create an API key. In the console, open Keys and create one. Copy the secret straight away: it is shown once, and we keep only a hash of it.
  4. Make a call. Put the key in 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.

Reference · 01

The API.

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.

EndpointWhat it does
POST /v1/chat/completionsOpenAI chat completions. Streams when stream is true.
POST /v1/responses
GET /v1/responses/{id}
OpenAI responses. The only surface for long-running work: send background: true and poll.
POST /v1/messages
POST /v1/messages/count_tokens
Anthropic messages. The token count is an estimate; billing always uses the model's own count.
POST /v1/embeddingsText to vectors, up to 2,048 inputs per request, at the model's full width.
GET /v1/modelsThe models this key may use. See models.
POST /v1/files
GET /v1/files/{id}
GET /v1/files/{id}/content
Upload a JSONL file of requests for a batch, and read its results.
POST /v1/batches
GET /v1/batches
GET /v1/batches/{id}
POST /v1/batches/{id}/cancel
Run an uploaded file within a day, at the lowest price.
POST /v1/tasks
GET /v1/tasks
GET /v1/tasks/{id}
POST /v1/tasks/{id}/finish
POST /v1/tasks/{id}/agents
POST /v1/tasks/{id}/events
POST /v1/agents/{id}/steps
POST /v1/steps/{id}/finish
Tracing: a record of what an agent did, in order, and what it cost.
POST /v1/usage/eventsFor other Navon services that meter something you pay for, such as storage. A project API key cannot use it.

With the OpenAI SDK

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)

With the Anthropic SDK

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"}]
  }'

Two speeds, and a third for batches

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.

Batches

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.

Embeddings

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.

Tracing

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"
Reference · 02

Models.

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.

Licences

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.

Reference · 03

Keys and roles.

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.

Roles

People hold a role in each project.

RoleCan
OwnerEverything, including making someone else an owner.
AdminInvite 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.
MemberCreate and revoke keys, see usage and policies, call models.
BillingSee 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 onlySee the project, its usage and its policies, and call models. Read only means it cannot change settings.
Reference · 04

Usage and billing.

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.

Prepaid credit

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.

Spend caps

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.

Where to see 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.

Reference · 05

Limits and errors.

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.

StatusCodeMeaning
400flex_requires_background and othersThe request is malformed or asks for a combination we refuse. The message names the fix.
401invalid_api_keyThe key is missing, malformed or revoked.
402credit_exhaustedYour prepaid balance is empty. Retrying will not help; adding credit will.
403spend_cap_reached, route_not_permitted, model_not_permittedA cap or a project policy stops this request.
404model_not_found and othersNo such object, or not one this key can see.
429organisation_rate_limitedYour organisation's request rate for this model is used up. Wait for Retry-After seconds, or ask an owner to raise the limit.
529model_saturatedThe 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.

Trust · 01

Audit trail.

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.

  • Append-only. The database account our services use has no permission to edit or delete an entry.
  • Signed. Every entry is signed, so an entry changed later fails verification, whoever changed it. Entries are signed with ML-DSA-65, a post-quantum algorithm; see security.
  • Yours alone. An export holds your organisation's entries and nobody else's. Ask us for one from Support in the console.
  • Kept for seven years.
Security · 01

Post-quantum secure, today.

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.

WhatProtectionStatus
Your connection to the console and the APIHybrid X25519 + ML-KEM-768 (NIST FIPS 203), TLS 1.3Live
Our edge to our serversHybrid X25519 + ML-KEM-768Live
Our servers to the services they callHybrid X25519 + ML-KEM-768, wherever the other side supports itLive
Operator access to serversHybrid sntrup761 + X25519 SSH key exchangeLive
Stored secrets and encrypted backupsAES-256, which stays at 128-bit strength against a quantum computerLive
Passwords, API keys and webhook signaturesscrypt, SHA-256 and HMAC, which quantum computers do not meaningfully weakenLive
Audit trail signaturesML-DSA-65 (NIST FIPS 204), with older records sealed under ML-DSALive
Old protocol versionsTLS 1.0 and 1.1 refused on every Navon addressLive
Website certificatesClassical, like every public website todayWaiting on the industry

Aligned with the UK NCSC

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.

Built to change again

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.

What your client needs

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.

What we do not claim

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.

Check it yourself

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.

Trust · 03

Data and residency.

Where requests run

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.

What we keep

  • Prompts and outputs are kept only if the project's retention setting says so. Every response says whether its content was kept, in navon.retained.
  • Embedding inputs are never kept.
  • Batch files are stored so the batch can run and you can read its results.
  • Usage records, which count tokens and never contain what was said, are kept for billing and for as long as the law requires.
  • The audit trail is kept for seven years.
Agents · 01

Agents.

Agent sign-in is being built

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.