FastAnchor API Docs
One API endpoint. 100+ AI models. OpenAI-compatible. Zero integration work.
Quickstart
FastAnchor is fully OpenAI-compatible. If you've used the OpenAI API before, you already know how to use FastAnchor — just change the base URL.
1. Get your API key
Sign up at aipossword.cn/dashboard → API Keys → Create Key.
2. Make your first request
# Replace YOUR_KEY with your actual API key
curl "https://api.aipossword.cn/v1/chat/completions" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "Explain APIs in one sentence."}
]
}'
3. Switch models in one line
Want to try Claude instead? Just change the model name:
# Same code, different model. That's it.
curl "https://api.aipossword.cn/v1/chat/completions" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{"role": "user", "content": "Explain APIs in one sentence."}
]
}'
https://api.aipossword.cn. The /v1/ prefix is the same as OpenAI's.
Authentication
Include your API key in the Authorization header of every request:
Authorization: Bearer YOUR_API_KEY
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
Chat Completions
POST /v1/chat/completions
The primary endpoint for text generation. Fully compatible with OpenAI's Chat Completions API.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID (e.g. gpt-4o, claude-sonnet-4-20250514) |
messages | array | Yes | Array of message objects with role and content |
max_tokens | integer | No | Maximum tokens in the response |
temperature | float | No | Sampling temperature (0-2) |
stream | boolean | No | Enable streaming responses (SSE) |
top_p | float | No | Nucleus sampling parameter |
stop | string/array | No | Stop sequences |
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1716672000,
"model": "gpt-4o",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "An API is..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 24,
"total_tokens": 36
}
}
Responses API
POST /v1/responses
OpenAI Responses API format. Supports tools, structured outputs, and web search (model-dependent).
curl "https://api.aipossword.cn/v1/responses" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"input": "What is the capital of France?"
}'
Streaming
Set "stream": true to receive Server-Sent Events (SSE). Compatible with OpenAI's streaming format.
curl "https://api.aipossword.cn/v1/chat/completions" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Tell me a story"}],
"stream": true
}'
Available Models
Browse all models and live pricing at aipossword.cn/pricing.
| Provider | Model | Input / 1M tokens | Output / 1M tokens |
|---|---|---|---|
| OpenAI | gpt-4o | $2.50 | $10.00 |
| OpenAI | gpt-4.1 | $2.00 | $8.00 |
| Anthropic | claude-sonnet-4-20250514 | $3.00 | $15.00 |
| Anthropic | claude-haiku-4-20250514 | $0.80 | $4.00 |
| gemini-3.0-pro | $1.25 | $5.00 | |
| DeepSeek | deepseek-v4-flash | $0.20 | $0.40 |
| DeepSeek | deepseek-v4-pro | $0.60 | $1.20 |
| Alibaba | qwen-3.7-max | $0.10 | $0.40 |
Pricing & Billing
Zero platform markup. You pay exactly what the model provider charges — we don't add anything on top.
| Plan | Price | What you get |
|---|---|---|
| Free | $0/mo | $5 credits, all models, 5 req/min |
| Pay-as-you-go | Model price | Unlimited requests, priority routing, team management |
| Enterprise | Custom | SSO, SLA, dedicated infra, volume discounts |
All billing is in USD via Stripe. Usage is tracked in real-time on your dashboard.
Error Codes
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed request body or missing required fields |
| 401 | invalid_api_key | Missing or invalid API key |
| 402 | insufficient_quota | You've exceeded your usage quota. Top up at aipossword.cn/dashboard |
| 404 | model_not_found | Model not available. Check aipossword.cn/pricing for active models |
| 429 | rate_limit | Too many requests. Check your plan's rate limit |
| 500 | upstream_error | The model provider returned an error. Auto-retry kicks in |
| 503 | service_unavailable | All upstream channels are down. We're working on it |
SDKs & Tools
Use any OpenAI-compatible SDK. Just change the base URL:
// Python — openai SDK
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KEY",
base_url="https://api.aipossword.cn/v1"
)
response = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
// JavaScript — openai npm package
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_KEY',
baseURL: 'https://api.aipossword.cn/v1',
});
const response = await client.chat.completions.create({
model: 'gemini-3.0-pro',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);
Rate Limits
| Plan | Requests/min | Tokens/min |
|---|---|---|
| Free | 5 | 10,000 |
| Pay-as-you-go | 500 | 1,000,000 |
| Enterprise | Custom | Custom |
Need help? Open an issue on GitHub or email support.
Documentation generated for FastAnchor / aipossword.cn