API 接入
用 GitHub、Google、Outlook 或 Apple 登录后,在控制台生成 ap- Key。地址是 https://agentpool.org/v1。
| 格式 | 地址 |
|---|---|
| OpenAI Chat | https://agentpool.org/v1/chat/completions |
| OpenAI Responses | https://agentpool.org/v1/responses |
| Anthropic Messages | https://agentpool.org/v1/messages |
| 模型列表 | https://agentpool.org/v1/models |
模型与价格
1 积分 = ¥0.01。标价 = xAI 官方美元价 × 7.2 × 0.8。只列出实测能返回正文的模型。提示达到 20 万 token 后走长上下文价。推理 token 算在输出里。调用结束立刻扣费,空回答不扣。
| 模型 | ID | 输入 / 百万 | 输出 / 百万 | 长上下文输入 | 长上下文输出 |
|---|---|---|---|---|---|
| Grok 4.7 Fast | grok-4.7-build-fast | 2304 | 6912 | 3456 | 10368 |
curl https://agentpool.org/v1/chat/completions \
-H "Authorization: Bearer ap-你的Key" \
-H "Content-Type: application/json" \
-d '{"model":"grok-4.7-build-fast","messages":[{"role":"user","content":"你好"}]}'
Codex
model = "grok-4.7-build-fast" model_provider = "agentpool" [model_providers.agentpool] name = "AgentPool" base_url = "https://agentpool.org/v1" env_key = "AGENTPOOL_API_KEY" wire_api = "responses"
Claude Code
export ANTHROPIC_BASE_URL=https://agentpool.org export ANTHROPIC_AUTH_TOKEN=ap-你的Key export ANTHROPIC_MODEL=grok-4.7-build-fast
状态码
| 401 | Key 无效或已撤销 |
| 402 | 积分不足 |
| 400 | 模型未开放 |
| 502 | 上游失败,未扣费 |
支付宝和微信入口在控制台。商家号未接通时,订单保持待支付,不会到账。