Private Local AI

An OpenAI-compatible inference API with data residency in Kenya.

The Taifa AI console: a thread sidebar on the left, and a composer showing the selected model and the local gateway it is pointed at.

Why local

How a request is routed

A gateway in front of the models the fleet already runs, with one allow-listed way out to a third-party provider.

  • Local by default

    Every plain model tag runs through Ollama on hardware this project controls. It is the path a request takes unless someone asks for otherwise.

  • Cloud access is allow-listed

    One model id is allow-listed to reach a third-party provider. A request only leaves the country when a caller names that id.

  • OpenAI-compatible endpoint

    One endpoint speaking the OpenAI shape, streaming included. Existing client libraries work by changing a single base URL.

  • Every request metered

    Served, refused or failed, each request writes a usage row the moment it happens, with a status and a token count you can bill against.

OpenAI wire format

Requests and responses keep the shapes an OpenAI client already sends and parses, so moving an existing integration is a base URL change rather than a rewrite.

  • 01 One endpoint: POST /v1/chat/completions
  • 02 Server-sent events when stream is true
  • 03 The {"error": ...} envelope on failures
  • 04 Served and refused requests both metered
API reference
POST /v1/chat/completions
model:
"ministral-3:3b"

messages: [
  { role: "user",
    content: "Check the status of application 4471." }
]

streaming

Application 4471 is currently under review. It was received on 14 August and cleared document checks on 21 August. No decision has been recorded against it yet, so there is nothing further for the applicant to submit at this stage

served by
ollama · nairobi
tokens
38 in · 71 out
ledger
written

Served today:

  • ministral-3:3b Ministral
  • gemma2:2b Gemma
  • llama3.2:3b Llama
  • nomic-embed-text embeddings
  • Taifa Cloud cloud, allow-listed

Compare

Routing options compared

The two Taifa columns differ by one allow-listed model id. Both write to the same usage table.

Taifa Cloud

gated fallback, allow-listed

  • Data stored in Kenya
  • Controlled hosting environment
  • Billing terms open to negotiation
  • Can be self-hosted
  • Every call in one usage ledger
  • Works with existing OpenAI clients

Provider API

straight to a vendor

  • Data stored in Kenya
  • Controlled hosting environment
  • Billing terms open to negotiation
  • Can be self-hosted
  • Every call in one usage ledger
  • Works with existing OpenAI clients

Getting started

Open the quickstart
  1. 01

    Mint a key

    Sign in to the console and create a project key. The plaintext is shown once, then only its hash is kept.

  2. 02

    Point your client

    Change the base URL on the OpenAI library you already use. The request and response shapes do not move.

  3. 03

    Check usage

    Every call appears in usage with its status and token count, including the ones that were refused or failed.

Send your first request

Mint a key, change one base URL, then check usage. The quickstart covers all three.

Get started