快速开始
第一次请求
验证 AnyRoute API Key 和 provider group 是否可用。
导入 Key 后,先运行一个小请求。
Anthropic-compatible
curl https://anyroute.io/v1/messages \
-H "Authorization: Bearer YOUR_ANYROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-haiku-20241022",
"max_tokens": 64,
"messages": [{"role": "user", "content": "Say hello from AnyRoute."}]
}'OpenAI-compatible
curl https://anyroute.io/v1/chat/completions \
-H "Authorization: Bearer YOUR_ANYROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Say hello from AnyRoute."}]
}'Gemini-compatible
curl "https://anyroute.io/v1beta/models/gemini-2.0-flash:generateContent" \
-H "Authorization: Bearer YOUR_ANYROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"role": "user", "parts": [{"text": "Say hello from AnyRoute."}]}]
}'如果请求失败,请先检查 Provider Group 不匹配 和 认证错误。
AnyRoute 文档