Taifa AI docs
Taifa AI is an OpenAI-compatible inference gateway. It speaks the same request and
response shapes as the OpenAI Chat Completions and Embeddings APIs, so an existing
OpenAI client library works against it by changing one base_url.
Every request answers from a local model, served through Ollama on hardware this project controls, unless it explicitly names the one cloud model id that is allow-listed to fall back to OpenRouter’s free tier. See Local vs. cloud routing for exactly how that gate works.
Where to start
- Quickstart: send your first request in under a minute.
- Authentication & API keys: how a key is minted, scoped, and revoked.
- Local vs. cloud routing: which model ids run where, and why.
- Building a knowledge base: embeddings + retrieval-augmented generation against this gateway.
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /v1/models | List every model this gateway currently serves |
| POST | /v1/chat/completions | Chat, with or without streaming |
| POST | /v1/embeddings | Embed text for search or retrieval |
| POST | /v1/threads | Start a thread with server-side memory |
| GET | /v1/threads | List your threads |
| GET | /v1/threads/{id} | Read a thread and its messages |
| DELETE | /v1/threads/{id} | Archive a thread |
| POST | /v1/threads/{id}/continue | Continue a thread, with or without streaming |
Every call needs an API key. See Authentication & API keys to mint one and see the exact header format.