Quickstart
1. Get a key
Keys are minted by an administrator from the console, or via the admin POST /keys endpoint (see Authentication & API keys). A key looks like tak_ followed by a random token, e.g. tak_8sK3v..., and is shown exactly once
at mint time.
2. Send a request
Every call is a Bearer-authenticated POST to /v1/chat/completions, same shape
as OpenAI’s Chat Completions API.
curl https://ai.rcfi.co.ke/v1/chat/completions \
-H "Authorization: Bearer tak_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "ministral-3:3b",
"messages": [
{ "role": "user", "content": "Summarise the Public Finance Management Act in three sentences." }
]
}'3. Stream it instead
Set "stream": true and read Server-Sent Events. Each frame is a raw, relayed
OpenAI-style chunk, terminated by a literal data: [DONE] line, see Streaming for the exact frame shape.
curl https://ai.rcfi.co.ke/v1/chat/completions \
-H "Authorization: Bearer tak_your_key_here" \
-H "Content-Type: application/json" \
-N \
-d '{
"model": "ministral-3:3b",
"stream": true,
"messages": [{ "role": "user", "content": "Write a haiku about Nairobi traffic." }]
}'4. See what’s actually being served
Model availability tracks what’s running behind the gateway, so check /v1/models before hard-coding an id.
curl https://ai.rcfi.co.ke/v1/models \
-H "Authorization: Bearer tak_your_key_here"Next: how local vs. cloud routing actually decides which pool answers a request.