The DipoleML API: native compatibility with the OpenAI and Anthropic SDKs

The DipoleML API at api.dipoleml.com speaks both the OpenAI and the Anthropic SDK formats natively, so most code that works today switches to Raven Max or Raven Flash by changing one line, the base URL. It bills prepaid credits that never expire, and cached input is discounted automatically, by up to 90%.
Key facts
- OpenAI format at /v1/chat/completions, Anthropic format at /v1/messages, on the same API.
- Switching is one line: point your existing SDK at api.dipoleml.com.
- Raven Flash: $0.50 per 1M input tokens, $0.05 cached. Raven Max: $1.25, $0.13 cached.
- Prepaid credit packs of $5, $10, $20 and $50, which never expire and are separate from every plan.
The DipoleML API at api.dipoleml.com serves Raven Max and Raven Flash, and it was built around a simple idea: you should not have to rewrite working code to switch models. It speaks both the OpenAI and the Anthropic SDK formats natively, so most tools switch by changing one line.
Which formats does the API speak?
Point your existing OpenAI SDK at the chat completions endpoint, or your existing Anthropic SDK at the messages endpoint. Both run on the same API and serve the same Raven models:
- OpenAI format: /v1/chat/completions, for the official openai client libraries
- Anthropic format: /v1/messages, for the official anthropic client libraries
The API streams, reads images in a message, and lets the models call your tools, and a reasoning channel may accompany the answer. GET /v1/models lists exactly the models your key can call.
What does the one-line change look like?
Here is the same request through each SDK, in Python. Only the base URL and the model name differ from code you may already have:
# OpenAI SDK format: /v1/chat/completions
from openai import OpenAI
client = OpenAI(base_url="https://api.dipoleml.com/v1", api_key="your-dipole-api-key")
reply = client.chat.completions.create(
model="Raven Flash",
messages=[{"role": "user", "content": "Say hello in five words"}],
)
print(reply.choices[0].message.content)
# Anthropic SDK format: /v1/messages
from anthropic import Anthropic
client = Anthropic(base_url="https://api.dipoleml.com", api_key="your-dipole-api-key")
message = client.messages.create(
model="Raven Flash",
max_tokens=1024,
messages=[{"role": "user", "content": "Say hello in five words"}],
)
print(message.content[0].text)
The API page has the same call in JavaScript and cURL for each format, and the quickstart goes from a new key to a first streamed answer.
How does prompt caching lower the bill?
Repeated input is expensive, so the API discounts it for you. When the start of your input hits the cache, the cached rate applies automatically: $0.05 per 1M tokens on Raven Flash instead of $0.50, and $0.13 on Raven Max instead of $1.25, up to 90% less on input. There is no code to change and no flag to set.
Input price, normal and cachedUS dollars per 1M tokens
| Model and rate | US dollars per 1M tokens |
|---|---|
| Raven Max, input | 1.25 |
| Raven Flash, input | 0.50 |
| Raven Max, cached input | 0.13 |
| Raven Flash, cached input | 0.05 |
How is the API billed?
The API is pay as you go, with prepaid credit packs of $5, $10, $20 and $50. Credits never expire, they are separate from every subscription, and each request is debited after it completes, from the tokens it actually used. Raven Flash bills $0.50 per 1M input and $2.50 per 1M output; Raven Max bills $1.25 per 1M input and $6.25 per 1M output. A request your balance cannot cover is refused up front with a clear 402, so nothing fails silently.
How do I switch?
Create a key in your dashboard, add credits, update your base URL, keep your client library, and send your first request. Prices and credit packs are on the pricing page.
Questions and answers
Do I need to rewrite my code to use the DipoleML API?
No. Keep the OpenAI or Anthropic SDK you already use and change its base URL to api.dipoleml.com, then set the model to Raven Flash or Raven Max and use your DipoleML API key.
Do I need a subscription to use the API?
No. The API bills prepaid credits, from $5, debited from actual token usage. Credits never expire and are separate from every Raven plan.
How does prompt caching work?
When the start of your input repeats, for example a long system prompt or document, the cached part bills at the cached rate automatically, saving up to 90% on input. There is no flag to set.
First published Last updated


