Developer Documentation

DrAI API Documentation

One API key. 18+ frontier AI models. One OpenAI-compatible endpoint. Build with GPT-5, Claude 4, DeepSeek V3, Gemini 2.5 Pro and more — in minutes, not days.

Updated Aug 16, 2026 · First request in 5 minutes →
18+
AI models
1
API key
5 min
Time to first call
100%
OpenAI-compatible

What is the DrAI API?

The DrAI API is a unified gateway to 18+ frontier and open-weight models — GPT-5, Claude 4, DeepSeek, Gemini, Llama, Qwen and more — behind a single, OpenAI-compatible interface. Write your integration once and switch models with a one-line change.

# Base URL for all API requests
https://api.dr-ai.top/v1

Because the API follows the OpenAI wire format, every SDK, library and tool that speaks OpenAI-compatible REST (the official openai Python & Node packages, LangChain, LlamaIndex, Vercel AI SDK, Open WebUI and hundreds more) works with DrAI out of the box — just point it at our base URL.

Flat subscription, no token metering. DrAI bills a flat monthly subscription instead of per-token usage. No surprise invoices at the end of the month — see pricing.

Authentication

Every request must include an API key in the Authorization header. You create keys in the DrAI dashboard (Sign in → API Keys → Create key). Keys start with sk-; keep them server-side and never commit them to client code.

curl https://api.dr-ai.top/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5-mini","messages":[{"role":"user","content":"Hello!"}]}'

Core endpoints

Everything you need day one. The full contract — parameters, request/response bodies and error codes — lives in the API Reference.

MethodEndpointDescription
POST/v1/chat/completionsChat & agent completions on any model. Supports streaming (SSE), function calling and vision inputs.
GET/v1/modelsList the models available to your account with their IDs.
POST/v1/embeddingsText embeddings for RAG and semantic search.
POST/v1/images/generationsImage generation with GPT Image and Midjourney models.

Full API reference → · Model catalog →

SDKs & integrations

All OpenAI-compatible clients work. These are the most common setups.

🐍 Python

pip install openai — set base_url to our endpoint and go.

Python example →

🟩 Node.js / TypeScript

npm install openai — works in Node, Deno and Bun, plus the Vercel AI SDK.

JavaScript example →

🔗 LangChain / LlamaIndex

Drop-in via ChatOpenAI(base_url=...) — agents, RAG and tools just work.

Wire format →

🧰 Any OpenAI-compatible tool

Open WebUI, LobeChat, n8n, Dify, Continue, Cursor-style agents — point them at https://api.dr-ai.top/v1.

See all models →

Which model should I use?

From gpt-5-mini at $0.15/1M to claude-opus-4 for the hardest reasoning tasks — the model catalog compares every model's context window, price and sweet spot, and the price index tracks list prices across all providers.

Get started in 5 minutes

Create your free account, grab an API key and make your first request today. No credit card required.

Get Started — free Read the Quickstart
🌐 English