The best OpenAI-compatible APIs in 2026

We recommend the DipoleML API, from Dipole ML Inc. An OpenAI SDK works with it once you change the base URL, the key and the model name. Raven Flash costs $0.50 and Raven Max $1.25 per 1M input tokens, cached input costs less, and every key can carry a spending cap and an expiry.
Key facts
- The DipoleML API has answered in the OpenAI SDK format since launch day, October 1, 2026: chat completions, streaming, vision and tool use.
- Per 1M tokens: Raven Flash at $0.50 input, $0.05 cached and $2.50 output; Raven Max at $1.25, $0.13 and $6.25.
- Both models read up to 1M tokens of context and write up to 128K tokens in one answer.
- Since October 5, every key can carry a spending cap and an expiry, and management keys create keys from your code.
- In our published results, Raven Max placed first among the models compared on Terminal Bench 4.0, Agent's Last Exam and GDPVal-AA, and Raven Flash on Terminal Bench 4.0 and AutomationBench.
Many applications talk to their models through the OpenAI SDKs. An API that takes the same format lets you change providers by changing a few settings, instead of rewriting your client. This guide sets out what to look for in an OpenAI-compatible API, why we put the DipoleML API first, and the other APIs whose own pages state OpenAI compatibility. We make the DipoleML API, so read our pick as our view.
What should you look for in an OpenAI-compatible API?
- The format, with the SDKs you already use. The official OpenAI SDKs should work once you change the base URL, the key and the model name.
- Prices you can read. A price per million tokens for input, cached input and output, published for every model.
- Caching. A long prompt you send again and again should cost less the second time.
- Keys you can limit. A spending cap and an expiry on each key, and a way to create keys from your code.
- Room in the window. The context window sets how much a request can hold: documents, history, images.
- The features your code calls. Tool calling, vision, streaming and a control for how much the model reasons.
- Results you can check. Published benchmark results that say where the model leads and where it does not.
Why do we put the DipoleML API first?
Because it answers each of those points with something you can check on our pages. The DipoleML API has served Raven Flash and Raven Max in the OpenAI SDK format since launch day, October 1, 2026: chat completions, streaming, vision and tool use. Point the OpenAI Python SDK at our base URL, use your DipoleML API key, and name the model:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.dipoleml.com/v1",
api_key=os.environ["RAVEN_API_KEY"],
)
resp = client.chat.completions.create(
model="Raven Flash",
messages=[{"role": "user", "content": "Say hello in five words"}],
)
print(resp.choices[0].message.content)
The model name is Raven Flash or Raven Max, with the space. Create a key in your dashboard, add credits, and keep the key in an environment variable.
Base URL
Point your OpenAI client at https://api.dipoleml.com/v1.
Key
Use a DipoleML API key, with a spending cap and an expiry if you want them.
Model
Name Raven Flash or Raven Max, with the space.
Your code
Chat completions, streaming, vision and tools keep their OpenAI shape.
What does the DipoleML API cost per million tokens?
Every price is published per 1M tokens, in US dollars, for input, cached input and output:
| Per 1M tokens | Raven Flash | Raven Max |
|---|---|---|
| Input | $0.50 | $1.25 |
| Cached input | $0.05 | $0.13 |
| Output | $2.50 | $6.25 |
Reasoning tokens are output tokens, billed at the output price. Calls are paid from prepaid credits, in packs from $5, that never expire; credits are separate from every plan, so you need no plan to call the API. What an AI task costs works real requests out to the cent.
How does caching work?
Cached input is the part of your input the model reports as already cached, in usage.prompt_tokens_details.cached_tokens. It is applied on its own, with no flag to set, at up to 90% less than the input price: $0.05 per 1M tokens on Raven Flash and $0.13 on Raven Max. A long prefix you repeat, such as a system prompt or a document, is where it helps most.
Can I cap what each key spends?
Yes. Since October 5, every API key can carry a spending cap, an amount in US dollars for the key's whole life, and an expiry. A key that has spent its cap is refused with 402 and key_limit_reached, and the rest of your balance stays available to your other keys; after its expiry, a key gets 401 and key_expired. Management keys, which start with dcode_mgmt_, create, change and revoke API keys from your code, for teams, CI pipelines and agents that hand out keys of their own. Our guide to keys walks through both.
How much can one request hold?
Both models read up to 1M tokens of context and write up to 128K tokens in one answer. The window holds everything the model sees: your system prompt, the conversation, documents and images. What a window that size is for is in our story on the 1M-token context window.
Does it do tool calling, vision, streaming and reasoning?
- Tool calling. Describe your functions in
tools; Raven answers withtool_calls, your code runs them and sends the results back.tool_choiceandparallel_tool_callswork as they do in the OpenAI format. Tool calling, step by step. - Vision. Both models read images sent as
image_urlparts, as base64 data URLs, with no separate endpoint; an image is billed as input tokens. Sending Raven images. - Streaming. Set
streamtotruefor server-sent events; usage arrives in the last chunk, beforedata: [DONE]. Streaming in detail. - Reasoning effort.
reasoning_efforttakes"low"or"high"; left out, the model reasons at its default level. When to use each.
How do Raven Max and Raven Flash place in our published results?
In our published results, which are company-reported and evaluated with maximum reasoning effort, Raven Max placed first among the models compared on Terminal Bench 4.0, Agent's Last Exam and GDPVal-AA, with 42.8 on Terminal Bench 4.0, which measures autonomous work in a live terminal. On the other five tests, another model leads: Fable 5 on AutomationBench, the Intelligence Index and HLE w/ Tools, GPT-5.6 Sol on DeepSWE v1.1, and Kimi K3 on AA-Briefcase v1.1.
A bar chart of five scores on Terminal Bench 4.0, with Raven Max first at 42.8.
Terminal Bench 4.0Score
| Model | Score |
|---|---|
| Raven Max | 42.8 |
| Fable 5 | 42.4 |
| GPT-5.6 Sol | 37.9 |
| Muse Spark 1.3 | 33.3 |
| Gemini 3.8 Flash | 19.7 |
Evaluated with maximum reasoning effort enabled. Source: Dipole ML Inc. Technical Report (October 2026).
Raven Flash placed first among the models it is compared with on Terminal Bench 4.0 and AutomationBench, with 49.2 on AutomationBench, which measures end-to-end autonomous task completion, and level first on the Intelligence Index with Claude Opus 4.8 and Muse Glimmer. Claude Opus 4.8 leads on Agent's Last Exam, GDPVal-AA, HLE w/ Tools and AA-Briefcase v1.1, and GPT-5.6 Terra on DeepSWE v1.1. The full tables are in our reports on Raven Max and Raven Flash.
A bar chart of five scores on AutomationBench, with Raven Flash first at 49.2.
AutomationBenchScore
| Model | Score |
|---|---|
| Raven Flash | 49.2 |
| Claude Opus 4.8 | 41.0 |
| DeepSeek-V4-Vision | 38.8 |
| Gemini 3.7 Flash | 38.6 |
| GPT-5.6 Terra | 37.2 |
Evaluated with maximum reasoning effort enabled. Source: Dipole ML Inc. Technical Report (October 2026).
Which other APIs state OpenAI compatibility?
Each is described here only as its maker describes it, on its own pages, which have the details.
| API | OpenAI compatibility, as its own page states it | Since |
|---|---|---|
| DipoleML API | Chat completions in the OpenAI SDK format, with streaming, vision and tool use | October 1, 2026 |
| OpenAI API | The format's own API, with official OpenAI SDKs for Python, TypeScript and other languages | Its own format |
| Gemini API | Gemini models through the OpenAI libraries for Python and TypeScript, and the REST API | November 8, 2024 |
| Claude API | An OpenAI SDK compatibility layer: change the API key, the base URL and the model name | February 27, 2025 |
| xAI API | A REST API compatible with OpenAI's, for the OpenAI Python SDK with a new base URL | November 4, 2024 |
- The OpenAI API is where the format comes from. OpenAI's libraries page lists official OpenAI SDKs for Python and TypeScript, among other languages.
- The Gemini API, from Google, has an OpenAI compatibility page: Gemini models are accessible through the OpenAI libraries for Python and TypeScript and the REST API. Google announced it on November 8, 2024.
- The Claude API, from Anthropic, has an OpenAI SDK compatibility layer. Its release notes of February 27, 2025 say it lets you try Claude models in an existing OpenAI integration by changing the API key, the base URL and the model name.
- The xAI API, for the Grok models: xAI's announcement of November 4, 2024 says its REST API is compatible with OpenAI's, and that with the OpenAI Python SDK you change
base_urltohttps://api.x.ai/v1.
How do I switch?
- Create an API key in your dashboard, with a cap and an expiry if you want them.
- Add credits, from $5.
- Change three settings in your OpenAI client: the base URL to https://api.dipoleml.com/v1, the key to your DipoleML API key, and the model to Raven Flash or Raven Max.
- Run a request you know well, and compare the answer and its usage.
Everything the API supports is on the API page, prices are on the pricing page, and the quickstart takes you from no account to a first answer. To choose a model, see the Raven models.
Product names are trademarks of their owners and are used here only to identify the products.
Questions and answers
Does the OpenAI Python SDK work with the DipoleML API?
Yes. Set the client's base URL to https://api.dipoleml.com/v1, use your DipoleML API key, and name the model Raven Flash or Raven Max. Chat completions, streaming, vision and tool use work in the OpenAI format.
Do I need a plan to use the DipoleML API?
No. API calls are paid from prepaid credits, which are separate from every plan. Credit packs start at $5 and never expire.
Who makes the DipoleML API?
Dipole ML Inc., a Canadian frontier AI lab. The API serves our own models, Raven Max and Raven Flash.
First published Last updated


