Migrate from OpenAI
Two lines of code. The OpenAI SDK works against Ollima unchanged — we expose the same chat completions, embeddings, streaming, tools, JSON mode, and image inputs at the same paths. Routing to open-weight models cuts most workloads' bills by 5-30×.
The one-line change
Model name mapping
The biggest wins come from swapping to open-weight models. Map your current models to their closest Ollima alias:
| Your current model | Closest Ollima alias | Notes |
|---|---|---|
| Flagship chat model | deepseek-v4 | Roughly comparable for chat + tool calling, at a fraction of the cost. |
| Fast / mini model | deepseek-v4-flash | Fast + cheap path. |
| Reasoning model | qwen3-32b (thinking) | Open-weights reasoning model. We strip the <think> chain so your client gets clean answers. |
| Embedding model | nomic-embed-text | 768-dim embedding, drop-in for most RAG workloads. |
API key mapping
Your OPENAI_API_KEY env var becomes your Ollima sk-t0-… key. Mint at app.ollima.com. Set a monthly cap on it from the same screen — a habit OpenAI doesn't make easy and that has saved customers thousands of dollars from runaway loops.
OpenAI features that work unchanged
- Streaming (
stream: true) — same SSE format, terminal[DONE],usagechunk viastream_options.include_usage. - Tool / function calling — see guide. Works on all our default-route models.
- Structured outputs / JSON mode —
response_format: { "type": "json_object" }. - Vision / image inputs — pass image_url content blocks. Supported on models flagged with the camera badge on /models.
- Embeddings —
/v1/embeddingswith model alias. - Per-request user tracking —
userfield captured as a tag (see App attribution).
Differences to know
- Assistants API / Threads / Files / Realtime audio: not on Ollima today. If you depend on them, BYOK OpenAI and we'll proxy chat completions while you keep using Assistants directly.
- Fine-tuning: for open-weight models, do it provider-side, then route through Ollima with that custom model name.
- Rate limits: Ollima caps RPM by plan (20 / 60 / 240). OpenAI's tiering is by per-model TPM/RPM. See Rate limits.
- Billing currency: INR by default, with GST invoices. USD billing available on Enterprise.
How your bill typically changes
For an org spending ~$5K/mo on a flagship closed model:
| Path | Effective rate | Monthly |
|---|---|---|
| Closed flagship, direct | $2.50 / 1M input | ~$5,000 |
| Ollima → deepseek-v4 | $0.59 / 1M input | ~$1,180 |
| Ollima → deepseek-v4-flash | $0.10 / 1M input | ~$200 |
| BYOK your provider through Ollima | $2.50 + ₹0.10/1k platform fee | ~$5,080 |
The savings are workload-dependent — your prompts and model choices change the picture. Try it in the dashboard to A/B real prompts side-by-side.