Use with coding tools

Point a coding tool or SDK you already use at api.dipoleml.com.

On this page

A coding tool that lets you add a model provider of the OpenAI or Anthropic SDK format can use Raven Flash and Raven Max. It needs three things: a base URL, an API key and the model names.

Before you start

  1. Create an API key on your dashboard and add credits (Authentication). A tool's requests bill your credits like any other call.
  2. Put the key in an environment variable, for example RAVEN_API_KEY, rather than in a config file you might commit.
  3. Check the key works:
curl
curl https://api.dipoleml.com/v1/models \  -H "Authorization: Bearer $RAVEN_API_KEY"

The answer lists Raven Flash and Raven Max. A 401 means the key is wrong; see Errors and limits.

The settings

Your tool speaksBase URLKey header
The OpenAI SDK format (often called "OpenAI compatible")https://api.dipoleml.com/v1Authorization: Bearer
The Anthropic SDK formathttps://api.dipoleml.comx-api-key, or Authorization: Bearer

Then add the models by name: Raven Max for hard reasoning and large changes, Raven Flash for fast, frequent work. The names have a space in them; letter case does not matter. If a config format cannot hold a space, put the name in quotes. A tool that lists the provider's models finds them at GET /v1/models.

Claude Code

Claude Code speaks the Anthropic SDK format. Set these in the shell profile where you start it:

shell
export ANTHROPIC_BASE_URL="https://api.dipoleml.com"export ANTHROPIC_AUTH_TOKEN="$RAVEN_API_KEY"export ANTHROPIC_MODEL="Raven Max"export ANTHROPIC_DEFAULT_HAIKU_MODEL="Raven Flash"

ANTHROPIC_AUTH_TOKEN sends the key as Authorization: Bearer; ANTHROPIC_API_KEY, which sends x-api-key, works as well. Start Claude Code again after you change them, and choose the model with /model.

Claude Code's requests are taken as they come, including the system messages it puts inside the conversation.

Tools of the OpenAI SDK format

In an editor or agent that offers an "OpenAI compatible" provider, choose it and fill in:

  • Base URL (sometimes "API base" or "override base URL"): https://api.dipoleml.com/v1
  • API key: your key, or the name of the environment variable that holds it, if the tool reads one.
  • Model: Raven Max and Raven Flash, added by hand if the tool does not list them.

Your own code works the same way with the official SDKs; see Chat Completions and Messages format.

What a tool can use

  • Chat calls, streaming, images, tool calling and reasoning, in both formats.
  • Only the tool's own functions as tools. In the Messages format a tool that runs on the server, such as web search, is refused with 400.
  • Not the Responses format: POST /v1/responses answers 404. A tool that only speaks that format cannot use the API today.

If it does not work

  • 401 missing_api_key: the tool sent no key, or sent it in a header its format does not use.
  • 404 model_not_found: the model name is spelled another way, such as raven-max. Use the names above.
  • 404 with the code 404: the base URL is wrong for the format (see the note above).
  • 402: the balance is empty or the key reached its cap (API Credits).