Quick Start
3 lines to integrate
Drop-in replacement for OpenAI. Works with any HTTP client.
Base URL
https://aicraftapi.com/v1

Requires HTTPS. All API requests must include your API key in the Authorization header.

Authentication
Authorization: Bearer YOUR_API_KEY

Get your API key from the Console. Keep it secret. Never expose it in client-side code.

Python
# Install: pip install openai
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://aicraftapi.com/v1"
)

response = client.chat.completions.create(
    model="auto",  # Auto Router picks the best model
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)
Node.js
// Install: npm install openai
import OpenAI from "openai";

const client = new OpenAI({
    apiKey: "YOUR_API_KEY",
    baseURL: "https://aicraftapi.com/v1"
});

const response = await client.chat.completions.create({
    model: "auto",
    messages: [{ role: "user", content: "Hello!" }]
});

console.log(response.choices[0].message.content);
curl
curl https://aicraftapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Auto Router — Model IDs

Set model: "auto" for automatic routing. Or specify a model ID directly:

Use CaseModel IDWhy
Codingdeepseek-v4-flashGlobal #1 · Fastest
Chinese contentqwen3.7-maxNative fluency
Translationqwen3.5-turboFast and affordable
Creative writingkimi-k2.6Natural storytelling
Deep reasoningdeepseek-r1Chain-of-thought
Long context (1M)gemini-3-proMassive context window
Premium codingclaude-sonnet-5Top accuracy (coming soon)
Model Pricing

Blended retail prices per 1M tokens. Subscriptions include CN models at lower rates via Auto Router. Full plan details on Pricing page.

ModelContextPrice / 1MBest For
DeepSeek V4 Flash1M$0.20Fast · Q&A · Translation
DeepSeek V3.2128K$0.70Coding · Logic
DeepSeek R1128K$0.80Deep reasoning
DeepSeek V4 Pro1M$0.80Advanced reasoning
Qwen3.5 Turbo32K$0.25Fast · Simple tasks
Qwen3.5 Plus32K$1.60Balanced · General
Qwen3.7 Max32K$3.20Chinese content
Qwen-Coder32K$3.20Code generation
GLM-5 Flash128K$1.00Fast · Cost-efficient
GLM-5.2128K$1.80Complex reasoning
Kimi K2.6128K$1.10Creative writing
Kimi K2.7 Code128K$1.60Coding · Code review
Doubao Lite32K$0.40Efficient · Low cost
MiniMax M3128K$1.00Creative writing
Claude Haiku 4.5200K$2.20Fast · Summarization
Claude Opus 4.8200K$9.50Most complex tasks
Claude Sonnet 5200KTBDComing soon
GPT-4o128K$6.00Multimodal · Vision
GPT-4o-mini128K$1.60Fast · Cost-efficient
Gemini 3 Pro1M$4.80Multimodal · Vision
Gemini 3.5 Flash1M$3.30Fast · Summarization
Gemini 2.5 Pro1M$1.70Balanced · Multimodal
Gemini Flash Lite1M$0.12Lightweight · Edge
Grok 4.3128K$2.00Creative · Brainstorm
Mistral Large 3128K$1.90Multilingual · EU data
Llama 4 Maverick128K$0.50Open source

Blended retail prices. Detailed input/output rates in API response headers. International models billed at listed price + plan margin (20-25% for Pro, 15-20% for Max). Video models: Kling $0.50/video, Seedance $0.50/video (pass-through), Wan2.1 $0.35/video.

Plans & Rate Limits
PlanRequestsTokens / Month
Free5 / min5M (CN models)
Starter $19Unlimited40M (CN models)
Pro $49Unlimited110M (CN + Intl pay-per-use)
Max $99Unlimited220M (CN + Intl pay-per-use)
Team $199Unlimited400M · 5 seats · SLA 99.5%
Business $499Unlimited1B · 20 seats · SLA 99.9%
EnterpriseUnlimitedCustom · SLA 99.95%
Error Codes
CodeMeaning
401Invalid or missing API key
429Rate limit exceeded. Upgrade your plan.
500Model temporarily unavailable. Auto Router will retry.
AICraft Assistant
Hi! Ask me about models, pricing, or API setup.
Powered by AICraft Auto Router