FastAnchor API Docs

One API endpoint. 100+ AI models. OpenAI-compatible. Zero integration work.

New here? Sign up at aipossword.cn, get $5 free credits, and make your first call in under 60 seconds.

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."}
    ]
  }'
Base URL: All API requests go to 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
HeaderRequiredDescription
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Chat Completions

POST /v1/chat/completions

The primary endpoint for text generation. Fully compatible with OpenAI's Chat Completions API.

Request Body

ParameterTypeRequiredDescription
modelstringYesModel ID (e.g. gpt-4o, claude-sonnet-4-20250514)
messagesarrayYesArray of message objects with role and content
max_tokensintegerNoMaximum tokens in the response
temperaturefloatNoSampling temperature (0-2)
streambooleanNoEnable streaming responses (SSE)
top_pfloatNoNucleus sampling parameter
stopstring/arrayNoStop 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.

ProviderModelInput / 1M tokensOutput / 1M tokens
OpenAIgpt-4o$2.50$10.00
OpenAIgpt-4.1$2.00$8.00
Anthropicclaude-sonnet-4-20250514$3.00$15.00
Anthropicclaude-haiku-4-20250514$0.80$4.00
Googlegemini-3.0-pro$1.25$5.00
DeepSeekdeepseek-v4-flash$0.20$0.40
DeepSeekdeepseek-v4-pro$0.60$1.20
Alibabaqwen-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.

PlanPriceWhat you get
Free$0/mo$5 credits, all models, 5 req/min
Pay-as-you-goModel priceUnlimited requests, priority routing, team management
EnterpriseCustomSSO, SLA, dedicated infra, volume discounts

All billing is in USD via Stripe. Usage is tracked in real-time on your dashboard.

Error Codes

StatusCodeMeaning
400invalid_requestMalformed request body or missing required fields
401invalid_api_keyMissing or invalid API key
402insufficient_quotaYou've exceeded your usage quota. Top up at aipossword.cn/dashboard
404model_not_foundModel not available. Check aipossword.cn/pricing for active models
429rate_limitToo many requests. Check your plan's rate limit
500upstream_errorThe model provider returned an error. Auto-retry kicks in
503service_unavailableAll 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

PlanRequests/minTokens/min
Free510,000
Pay-as-you-go5001,000,000
EnterpriseCustomCustom

Need help? Open an issue on GitHub or email support.
Documentation generated for FastAnchor / aipossword.cn