Getting Started

Quickstart

RavenRouter provides a unified OpenAI-compatible API that gives you access to 200+ AI models through a single endpoint — with unified authentication, billing, and routing.

Create an API key in the console before calling. Keep keys on the server side; never expose them in browser code.


Ways to integrate

ApproachBest for
HTTP APIFull control, any language, no dependencies
OpenAI SDKDrop-in replacement — point baseURL at RavenRouter
Console PlaygroundTry models in the browser before wiring your app

Authentication

All requests require a Bearer token in the request header. Create keys under Console → API Keys, then pass `Authorization: Bearer <API_KEY>` on every call.

Required request header

Authorization: Bearer <API_KEY>

Keys are scoped to your account. Disable or rotate compromised keys immediately in the console.


Using the RavenRouter API

Send a POST to `/v1/chat/completions`. Examples below are in cURL, Node.js, and Python — include your API key in the `Authorization` request header to deploy quickly.

Base URL: https://api.ravenrouter.ai

curl https://api.ravenrouter.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "DeepSeek-V3.2",
    "messages": [
      { "role": "user", "content": "What is the meaning of life?" }
    ]
  }'

List models:

curl https://api.ravenrouter.ai/v1/models \
  -H "Authorization: Bearer <API_KEY>"

Using the OpenAI SDK

Point the official OpenAI SDK at RavenRouter. Only the `baseURL` and `apiKey` need to change.

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.RAVENROUTER_API_KEY,
  baseURL: 'https://api.ravenrouter.ai/v1',
});

const completion = await client.chat.completions.create({
  model: 'DeepSeek-V3.2',
  messages: [{ role: 'user', content: 'What is the meaning of life?' }],
});

console.log(completion.choices[0].message.content);

Common endpoints

MethodPathDescription
GET/v1/modelsList available models
POST/v1/chat/completionsChat completions (OpenAI compatible)
POST/v1/images/generationsImage generation
POST/v1/video/generationsVideo generation (async task)
GET/v1/video/generations/{task_id}Query video task status

FAQ

401 Unauthorized
Invalid, disabled, or expired API key — or missing Authorization header.
429 Too Many Requests
Rate or concurrency limit hit. Retry with backoff or upgrade your plan.
400 Bad Request
Unknown model slug or malformed JSON body. Check /v1/models for valid names.