Skip to content

Quickstart

The Token Factory speaks the OpenAI API, so any OpenAI-compatible client works by pointing its base URL at Navon.

  1. Get an API key from the customer portal. See Authentication for details.

  2. Point your client at Navon and call a model from the catalog:

    Terminal window
    curl https://api.navon.africa/v1/chat/completions \
    -H "Authorization: Bearer $NAVON_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "model": "navon/swahili-8b",
    "messages": [{"role": "user", "content": "Habari?"}]
    }'
  3. Or use the OpenAI SDK with the base URL swapped:

    from openai import OpenAI
    client = OpenAI(
    base_url="https://api.navon.africa/v1",
    api_key="NAVON_API_KEY",
    )
    resp = client.chat.completions.create(
    model="navon/swahili-8b",
    messages=[{"role": "user", "content": "Habari?"}],
    )
    print(resp.choices[0].message.content)

Nothing you send here leaves the country, and by default nothing is retained. See the Token Factory overview for the full capability set.