Frequently Asked Questions

50 answers about models, integration, scaling, billing, and more — your complete DrAI reference.

🚀 Getting Started

What is DrAI?

DrAI is a unified AI API gateway that provides one API key for GPT-5, Claude 4, DeepSeek R1, Gemini 2.5 Pro, and 15+ other large language models. The endpoint is OpenAI-compatible, so you change only your base_url and keep your existing SDK. DrAI handles provider relationships, billing, automatic failover, response caching, and cost-aware model routing. In production it delivers 62% average cost reduction and serves 23% of requests from cache.

How do I get started with DrAI?

Create a free account at ai.dr-ai.top/signin, generate an API key from the dashboard, then point your OpenAI SDK at https://api.dr-ai.top/v1 with your DrAI key. The whole process takes under 5 minutes — no credit card required for the free tier. Your existing OpenAI, LangChain, or LlamaIndex code works unchanged since the API is fully OpenAI-compatible.

How much does DrAI cost?

DrAI has three plans: Free (access to 5 base models with rate limits), Pro at $9.99/month (all models, higher limits), and Max at $29.99/month (priority routing, highest limits). Pay-as-you-go API credits start at $5 for ~5M tokens. API pricing is passthrough provider pricing plus 3-4%, which is cheaper than self-hosting a multi-model gateway for most teams.

Is there a free tier?

Yes. The free tier includes access to Qwen 3.5, Kimi K2.6, GLM-4, Grok Chat Fast, and Grok Imagine with daily rate limits. No credit card is required to sign up. The free tier is designed for evaluation and light use; upgrade to Pro ($9.99/mo) for GPT-5.6 Sol, Claude 4 Sonnet, and Gemini 2.5 Pro access.

How do I get an API key?

Sign in at ai.dr-ai.top, open your dashboard, and click 'Create API Key'. Keys follow the sk- format and work immediately with any OpenAI-compatible client. You can create multiple keys for different projects, set per-key spending limits, and revoke keys at any time from the dashboard.

⚙️ Technical

Is the API OpenAI-compatible?

Yes, fully. DrAI implements the OpenAI Chat Completions, Embeddings, and Images APIs. Any SDK built for OpenAI — Python, JavaScript, Go, Rust, or community libraries — works by changing two lines: the base_url to https://api.dr-ai.top/v1 and the api_key to your DrAI key. Streaming (SSE), function calling, and structured outputs are supported across all models.

Which AI models are available?

18+ models from 7 providers: GPT-5, GPT-5-mini, GPT-5.6 Sol (OpenAI); Claude Opus 4, Claude Sonnet 4 (Anthropic); DeepSeek R1, DeepSeek V3 (DeepSeek); Gemini 2.5 Pro (Google); Llama 4 405B (Meta); Qwen 3.5 (Alibaba); Kimi K2.6 (Moonshot); GLM-4 (Zhipu); plus image models GPT Image 1/1.5/2 and Grok Imagine. New models are added within days of release.

What are the rate limits?

Free tier: 20 requests/minute and 50K tokens/day. Pro: 200 requests/minute and 2M tokens/day. Max: 600 requests/minute and 10M tokens/day. Pay-as-you-go credits bypass daily token limits with 300 requests/minute. All plans support burst capacity up to 2x for 60 seconds. Rate limit headers (X-RateLimit-*) are returned on every response.

Does DrAI support streaming?

Yes, Server-Sent Events (SSE) streaming is supported for every model, normalized to the OpenAI streaming format. Whether the underlying provider uses SSE, WebSocket, or chunked transfer, DrAI outputs standard OpenAI-style stream chunks, so client code stays identical across models. Median time-to-first-token is 420ms for GPT-5 and 240ms for DeepSeek Chat.

What is the API latency?

DrAI adds under 40ms p50 overhead over direct provider calls — measured across millions of production requests. End-to-end first-token latency depends on the model: GPT-5-mini at 180ms, DeepSeek Chat at 240ms, GPT-5 at 420ms, Claude Sonnet 4 at 320ms. Requests served from cache (23% of traffic) return in under 60ms.

How does error handling work?

DrAI returns standard OpenAI-format errors with stable error codes. Automatic retries with exponential backoff handle transient provider failures (5xx, timeouts). Circuit breakers trip after 5 consecutive failures per provider and skip it for 60 seconds. Client-side, implement retry on 429/5xx with jittered backoff — our error handling guide includes production-ready Python and JavaScript code.

How does automatic failover work?

When a provider fails or times out, DrAI reroutes the request to a configured fallback model in real-time — for example GPT-5 to Claude Sonnet 4 to DeepSeek Chat. Users never see the failure. In the last 3 months this covered two OpenAI outages and one Anthropic outage with zero user-visible downtime. Failover is configurable per API key.

How does response caching work?

Deterministic requests (same prompt, temperature=0) are cached in Redis with a 1-hour TTL. 23% of production requests hit the cache, returning in under 60ms with zero upstream cost. Cache is bypassed with temperature > 0 or cache_control: no-cache. Semantic caching (embedding similarity > 0.95) is in beta for Q&A workloads.

⚖️ Comparison

DrAI vs using OpenAI directly?

Direct OpenAI gives you one provider. DrAI gives you OpenAI plus Anthropic, DeepSeek, Google, Meta, and more behind the same API — with automatic failover when a provider goes down (we covered 3 outages with zero downtime), cost-aware routing that cut costs 62%, and one billing dashboard. If you only ever need one provider, direct works; the moment you need a second model or reliability, DrAI wins.

DrAI vs Azure OpenAI Service?

Azure OpenAI requires per-region deployments, capacity requests, and regional failover configuration. DrAI offers all models globally with no capacity planning, instant model switching, and multi-provider failover Azure can't provide (Azure only fails over within OpenAI). Azure offers enterprise compliance features (data residency, VNet); DrAI offers speed of integration and 7 providers under one key.

DrAI vs self-hosting a gateway (LiteLLM)?

Self-hosting LiteLLM is free but costs engineering time: server maintenance, provider credential rotation, failover logic, streaming normalization, and monitoring. Our open-source guide estimates 15-20 engineering hours monthly for a production gateway. DrAI is that gateway managed: 40ms p50 overhead, 99.9% uptime, new models added within days. Self-host if you need data locality; DrAI otherwise.

DrAI vs OpenRouter?

Both aggregate models behind one API. DrAI differentiates on: automatic failover across providers (not just retries), response caching (23% hit rate saves real money), cost-aware routing that picks the cheapest capable model per request, a built-in chat UI with knowledge base, and 18-language support. OpenRouter has broader model coverage; DrAI has deeper production features.

How much cheaper is DrAI?

Three savings: (1) Cost-aware routing averages 62% reduction by matching request difficulty to model price. (2) Response caching serves 23% of requests free. (3) Passthrough pricing plus 3-4% — no per-model markup. Example workload: 1M requests/month of mixed difficulty costs roughly $310 via DrAI routing vs $820 direct GPT-5 — a 62% saving before caching.

Can I switch from OpenAI without code changes?

Almost. Change base_url from https://api.openai.com/v1 to https://api.dr-ai.top/v1 and your api_key to a DrAI key. Everything else — SDKs, streaming, function calling, embeddings — is compatible. Most migrations take under 30 minutes including testing. Our chatbot integration guide walks through the exact steps with rollback patterns.

🔒 Security & Privacy

What is your data retention policy?

Prompts and responses are retained for 30 days for abuse monitoring and billing reconciliation, then permanently deleted. Cached responses expire after 1 hour. We never use customer data for model training. Enterprise plans (coming soon) offer zero-retention mode where nothing is stored beyond request lifetime.

Is data encrypted in transit and at rest?

Yes. All traffic uses TLS 1.3 in transit. Data at rest is encrypted with AES-256 (PostgreSQL and Redis). API keys are stored hashed with bcrypt. Internal service-to-service traffic runs over an encrypted Docker network. We undergo quarterly third-party security scans.

Are you compliant with SOC2/GDPR?

GDPR: yes — we process data as a processor, offer DPA signing, support right-to-erasure (automated via dashboard), and EU users can request EU-only processing. SOC2 Type II audit is in progress with completion targeted Q1 2027. Until then, our security page documents all controls in detail.

Do you train models on my data?

No. DrAI never uses customer prompts or completions for training. Data flows through our gateway to the provider you selected; providers' own data policies apply upstream (configure zero-data-retention with OpenAI and Anthropic APIs, which we pass through). Our 30-day retention is for abuse prevention only.

💳 Billing

What payment methods do you accept?

Credit and debit cards via Stripe (Visa, Mastercard, Amex, UnionPay) and cryptocurrency via 0xProcessing (BTC, ETH, USDT, USDC, and 40+ other tokens). Subscriptions auto-renew; pay-as-you-go credits are one-time purchases that never expire. Enterprise invoicing is available for Max plan customers.

What is your refund policy?

Subscriptions: full refund within 7 days if you've used under 10% of quota. Pay-as-you-go credits: refundable in full within 48 hours if unused. Failed or duplicated charges are refunded automatically within 5 business days. Contact atlas@dr-ai.top with your account email — refunds are processed without questions within policy.

🧠 Models

Which models are fastest?

DeepSeek Chat is the fastest text model with 240ms median time-to-first-token, followed by GPT-5-mini at 180ms for short prompts. Claude Sonnet 4 sits at 320ms, GPT-5 at 420ms, and Gemini 2.5 Pro at 380ms. For latency-sensitive applications like real-time chat, DeepSeek Chat or GPT-5-mini are recommended. Cost-aware routing automatically selects the fastest capable model when latency is your priority — this cut average response time by 35% in our benchmarks across 10,000 test requests. Cache hits return in under 60ms regardless of model chosen.

Which models support function calling?

Function calling (tool use) is supported on GPT-5, GPT-5-mini, GPT-5.6 Sol, Claude Opus 4, Claude Sonnet 4, Gemini 2.5 Pro, DeepSeek V3, Qwen 3.5, and GLM-4 — 9 models total. The API follows the OpenAI function calling format exactly: define tools in the tools array, and the model returns tool_calls in the response. DrAI normalizes function calling across providers so your code stays identical. Parallel function calls (multiple tools in one response) are supported on GPT-5 and Claude 4 models. Models without function calling gracefully ignore the tools parameter without errors.

Which models have vision capability?

Vision (image input) is supported on GPT-5, GPT-5-mini, GPT-5.6 Sol, Claude Opus 4, Claude Sonnet 4, Gemini 2.5 Pro, and Qwen 3.5 — 7 models. Send images via the messages array using the image_url content type, identical to OpenAI's vision API. DrAI handles format conversion between providers (e.g. OpenAI's detail parameter to Anthropic's media_type). Maximum image size is 20MB per image. Vision requests cost the same as text for the input tokens consumed — a 1024x1024 image uses approximately 765 tokens on GPT-5 and 1,600 tokens on Claude Sonnet 4.

Can I use multiple models in one request?

No — each API call targets one model. However, DrAI's cost-aware routing can automatically select the best model per request based on prompt complexity, latency, and cost. You can also chain requests: use a fast model like GPT-5-mini to classify intent, then route to Claude Sonnet 4 for complex reasoning. For multi-model workflows, use parallel requests with different API keys. DrAI's dashboard shows per-model usage breakdown, and 62% of production users route across 3 or more models automatically. Manual model selection via the model parameter always overrides routing.

What's the largest context window available?

Gemini 2.5 Pro offers the largest context window at 2 million tokens, ideal for long-document analysis and large codebases. Claude Sonnet 4 and Claude Opus 4 support 200K tokens each. GPT-5 and GPT-5.6 Sol provide 128K token windows. DeepSeek V3 supports 128K tokens, and Qwen 3.5 offers 131K. For most applications, 128K tokens (about 96,000 words) is sufficient. DrAI enforces context limits per model and truncates gracefully with a warning header. Pricing scales linearly with input tokens — no surcharge for long contexts on any model.

How often are new models added?

New models are added within 2 to 5 days of provider release. In the last 6 months we have added 7 new models including GPT-5.6 Sol, Claude Opus 4, DeepSeek R1, and Gemini 2.5 Pro. When OpenAI, Anthropic, or Google announces a model, we typically have it live within 72 hours. Subscribers are notified via email and dashboard alerts. Model deprecations follow provider timelines with 30-day advance notice. The model list is visible at /v1/models and updates automatically — no SDK changes needed to access newly added models.

Do you support open-source models?

Yes. DrAI routes open-source models via SiliconFlow infrastructure: DeepSeek R1, DeepSeek V3, Qwen 3.5, GLM-4, and Llama 4 405B are all available. Open-source models use separate API keys (opensource-group) from proprietary models to ensure correct routing. Pricing for open-source models is 40 to 80% cheaper than proprietary equivalents — DeepSeek V3 costs approximately $0.14 per million tokens vs $5.00 for GPT-5. Open-source models support streaming, function calling, and long contexts identically to proprietary models. Kimi K2.6 from Moonshot is also available as an open-weight option.

What about image generation?

DrAI supports 4 image generation models: GPT Image 1, GPT Image 1.5, GPT Image 2, and Grok Imagine. All are accessible via the OpenAI Images API at /v1/images/generations. GPT Image 2 produces up to 1024x1024 resolution with 4 style presets. Grok Imagine specializes in artistic and stylized outputs. Pricing is per-image: $0.04 for GPT Image 1, $0.08 for GPT Image 1.5, and $0.16 for GPT Image 2. Image generation does not consume token credits — it is billed separately. The free tier includes 10 images per day with Grok Imagine.

🔌 Integration

Which SDKs are supported?

Any OpenAI-compatible SDK works: official OpenAI SDKs for Python, JavaScript/TypeScript, Go, and Rust; community libraries for Java, C#, Ruby, PHP, Swift, and Kotlin. DrAI implements the full OpenAI API surface (Chat Completions, Embeddings, Images, Models, Moderation), so approximately 50+ SDKs are compatible out of the box. We also provide a community-maintained DrAI Python wrapper with convenience methods for model routing, cost tracking, and batch processing. No proprietary SDK lock-in — if a library works with OpenAI, it works with DrAI by changing the base_url.

Does DrAI support the OpenAI API standard?

Yes, 100%. DrAI implements the complete OpenAI API specification: Chat Completions, Completions, Embeddings, Images, Audio, Files, and Models endpoints. Request and response formats, error codes, and headers are identical to OpenAI's. The /v1/models endpoint returns the full 18+ model list in OpenAI format. Streaming uses the same SSE chunk format. Structured outputs (response_format: json_object) work on all supporting models. The only difference is the base_url and the API key — everything else is drop-in compatible. We track OpenAI API changes and add new features within 5 days.

How do I migrate from OpenAI to DrAI?

Migration takes under 30 minutes. Step 1: Create a DrAI account and API key. Step 2: Change your base_url from https://api.openai.com/v1 to https://api.dr-ai.top/v1. Step 3: Replace your OpenAI API key with your DrAI key. Step 4: Test with a simple request — most code works unchanged. Step 5: Optionally configure failover and cost-aware routing via dashboard. Our migration guide includes language-specific examples for Python, JavaScript, Go, and framework integration for LangChain, LlamaIndex, and Vercel AI SDK. Rollback is instant — just revert the base_url.

Can I use the OpenAI Python SDK?

Yes, directly. Install with pip install openai (v1.x), then set base_url to https://api.dr-ai.top/v1 and api_key to your DrAI key in the OpenAI client. All methods work: client.chat.completions.create(), client.embeddings.create(), client.images.generate(), client.models.list(). Streaming via stream=True is fully supported. The SDK's automatic retry and timeout settings work identically. Async usage (AsyncOpenAI client) is supported. The only known limitation is the Assistants API (beta) — use Chat Completions instead. Over 95% of production users use the official OpenAI Python SDK with zero DrAI-specific code changes.

Do you have a JavaScript SDK?

Use the official OpenAI Node.js SDK (npm install openai, v4.x). Set baseURL to https://api.dr-ai.top/v1 and apiKey to your DrAI key. All methods work in both CommonJS and ESM: openai.chat.completions.create(), embeddings, images, models. Streaming uses the same async iterator pattern. The SDK works in Node.js 18+, Bun, Deno, and browsers with dangerouslyAllowBrowser. Edge runtime (Cloudflare Workers, Vercel Edge) is fully supported with streaming. DrAI also provides a thin JavaScript wrapper for cost tracking and multi-model routing, but the OpenAI SDK is the primary client. TypeScript types are included out of the box.

What about LangChain integration?

LangChain works seamlessly via the ChatOpenAI wrapper. Set openai_api_base to https://api.dr-ai.top/v1 and openai_api_key to your DrAI key — no other changes needed. Both LangChain Python and LangChain.js are supported. LangChain's streaming, function calling, tool use, structured output, and agent workflows all work with DrAI. LangGraph orchestration, RAG pipelines via the embeddings endpoint, and LCEL chains are fully compatible. We have verified integration with LangChain v0.3 and v0.2. LlamaIndex works identically — set the OpenAI base_url in Settings. Over 40% of DrAI users run LangChain or LlamaIndex in production with zero compatibility issues.

📈 Scaling

How many requests can I send?

It depends on your plan. Free tier: 20 requests/minute, 50,000 tokens/day, approximately 1,440 requests/day max. Pro plan: 200 requests/minute, 2M tokens/day, approximately 28,800 requests/day. Max plan: 600 requests/minute, 10M tokens/day, approximately 43,200 requests/day. Pay-as-you-go: 300 requests/minute with no daily token cap — send unlimited requests as long as you have credits. Burst capacity allows 2x your rate limit for 60 seconds. For higher volumes, contact us for custom Enterprise limits up to 5,000 requests/minute. Rate limit headers on every response show remaining quota.

What are the rate limits for each plan?

Free: 20 req/min, 50K tokens/day. Pro at $9.99/mo: 200 req/min, 2M tokens/day. Max at $29.99/mo: 600 req/min, 10M tokens/day. Pay-as-you-go credits: 300 req/min, no daily token limit. All plans include burst capacity of 2x the base rate for 60 seconds. Rate limits are per API key, not per account — create multiple keys to distribute load. The X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers on every response tell you exactly how much capacity remains. When you hit a limit, you get HTTP 429 with a Retry-After header indicating seconds to wait.

Can I get higher rate limits?

Yes. Three options: (1) Upgrade plans — Pro gives 10x the Free limits, Max gives 30x. (2) Pay-as-you-go credits permanently bypass daily token limits with 300 req/min. (3) Enterprise plans (contact sales) offer custom limits up to 5,000 requests/minute and 100M tokens/day with dedicated capacity. For temporary spikes, burst capacity auto-activates at 2x for 60 seconds. Teams running bulk processing can request a temporary limit increase for up to 7 days. All limit changes take effect within 24 hours. Over 60% of Max plan users never hit any rate limit in daily practice.

Do you support batch requests?

Yes. DrAI's batch API endpoint at /v1/batches follows the OpenAI Batch API format. Submit up to 50,000 requests in a single batch file, processed within 24 hours at 50% cost (matching OpenAI's batch pricing discount). Batch jobs support chat/completions and embeddings endpoints. Results are available via download URL. Batch is ideal for non-time-sensitive workloads: data labeling, document summarization, embedding generation. For synchronous multi-request needs, send parallel requests up to your concurrency limit. The batch API is available on Pro and Max plans; Free tier users can submit batches up to 500 requests.

What about concurrent requests?

Concurrency is limited by your plan's rate limit. Free: 20 concurrent connections. Pro: 200 concurrent connections. Max: 600 concurrent connections. Pay-as-you-go: 300 concurrent connections with burst to 600. DrAI manages connection pooling automatically — HTTP keep-alive is enabled by default. For high-concurrency applications, use async HTTP clients (aiohttp in Python, fetch in JS) and persistent connections. DrAI's gateway handles 10,000+ concurrent connections at the infrastructure level. We recommend keeping local concurrency at 70 to 80% of your limit to allow headroom for retries. Connection-level errors trigger automatic retry with backoff.

💳 Billing Details

How is usage billed?

API usage is metered per token: input tokens (prompt) and output tokens (completion) are billed separately. Pricing follows provider rates plus 3 to 4%. For example, GPT-5 costs $5.00 per million input tokens and $15.00 per million output tokens via DrAI. Cached responses (23% of traffic) cost $0 — no input token charge. Image generation is billed per image at $0.04 to $0.16. Embeddings cost $0.02 per million tokens. The dashboard shows real-time spend with per-model, per-key, and per-request breakdowns. Usage resets monthly for subscriptions; pay-as-you-go credits deplete until exhausted. All amounts are in USD.

Can I set spending limits?

Yes. Per-key spending limits can be set in the dashboard: define a monthly dollar cap or token cap for each API key. When a key hits its limit, requests return 429 with a clear spending limit exceeded message. Limits can be hard (block requests) or soft (email alert only). You can also set project-level budgets with email alerts at 50%, 80%, and 100%. Daily spending alerts are available via email and webhook. The dashboard shows projected monthly spend based on current usage patterns. Limits update instantly — no service restart required. This feature is available on all plans including the Free tier.

What happens if I exceed my plan?

On subscriptions (Pro and Max): when you exceed your daily token limit, requests return 429 until reset at midnight UTC. You can add pay-as-you-go credits to continue without waiting — credits activate instantly and bypass daily limits. On pay-as-you-go: when credits deplete, requests return 402 (payment required). Add credits via Stripe or crypto to resume immediately. No surprise charges — DrAI never auto-charges your card when credits run out. The dashboard sends email alerts at 80% and 100% quota usage. On the Free tier, daily limits reset at midnight UTC. All requests in-flight complete normally when limits are hit.

Do unused tokens roll over?

Subscription plans (Pro and Max) have monthly token allowances that do not roll over — they reset on the 1st of each month. Unused tokens from one month do not accumulate. However, pay-as-you-go credits never expire: a $5 purchase gives you approximately 5 million tokens that remain available indefinitely until consumed. Credits have no monthly reset. This makes credits ideal for variable workloads — buy once, use anytime. If you downgrade from Pro to Free, unused subscription tokens are forfeited, but any pay-as-you-go credits remain active. Check your balance anytime via the dashboard or GET /api/v1/user/profile.

Can I get an invoice?

Yes. All transactions generate downloadable PDF invoices from the dashboard under Billing then Invoices. Invoices include transaction ID, date, plan, amount, tax breakdown, and your company details (editable in account settings). For Enterprise and Max plan customers, we support custom invoicing with NET-30 payment terms and purchase orders. VAT-compliant invoices are available for EU customers with valid VAT IDs. For crypto payments via 0xProcessing, invoices include the transaction hash and USD equivalent at payment time. Need a custom invoice format or W-9? Email atlas@dr-ai.top — we respond within 24 hours.

Is there a free tier?

Yes. The free tier requires no credit card and includes access to 5 models: Qwen 3.5, Kimi K2.6, GLM-4, Grok Chat Fast, and Grok Imagine. Limits are 20 requests/minute, 50K tokens/day, and 10 images/day. The free tier never expires — use it indefinitely for evaluation, prototyping, or light production. When you need GPT-5, Claude 4, or higher limits, upgrade to Pro ($9.99/mo) or buy pay-as-you-go credits starting at $5. Free tier users get the same API, SDK compatibility, streaming, and dashboard features as paid plans — the only difference is model access and rate limits.

Still have questions?

Start free — no credit card required. 5 minutes to your first API call.

Create Free Account
🌐 English