Docs menu
Getting started
API
Account
Quickstart
From an empty terminal to a streamed raven answer in about five minutes.
This guide takes you from an empty terminal to a streamed raven answer. You need an account at chat.dipoleml.com and about five minutes.
#1. Get an API key
Sign in at your dashboard with Google or Apple, open the API keys panel, and create a key. It starts with dcode_sk_ and is shown exactly once, so copy it somewhere safe. Store it in an environment variable rather than in code:
export RAVEN_API_KEY="dcode_sk_your key here"#2. Add API credits
The API is pay-as-you-go and bills prepaid credits, separate from any subscription. In your dashboard, open the credits panel and add a pack (the smallest is $5). A request without a credit balance returns 402 with a top-up link, so nothing breaks silently.
#3. Make your first request
curl https://api.dipoleml.com/v1/chat/completions \
-H "Authorization: Bearer $RAVEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Raven Flash",
"messages": [{"role": "user", "content": "Say hello in five words"}]
}'The response is a standard chat completion. The answer is in choices[0].message.content and the token counts are in usage:
{
"id": "gen-1791206838-shBDnVfGddeVVEHq4DsN",
"object": "chat.completion",
"model": "Raven Flash",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Northern lights blaze softly tonight."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 21, "completion_tokens": 12, "total_tokens": 33}
}#4. Use the OpenAI client
The API is OpenAI-compatible, so the client libraries you already use work by changing the base URL:
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)#Next steps
- Streaming: token-by-token responses over SSE.
- Vision: send images alongside text.
- Reasoning: control how hard the models think.
- Errors and Quotas: what every status code means.