Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
对每个 API 请求强制执行组织策略。安全护栏控制可使用的模型、设置消费限额并配置数据保留策略,一切均可集中管理。
402
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \ -H "Authorization: Bearer lr_admin_xxxx" \ -H "Content-Type: application/json" \ -d '{"limit_usd": 50.00}'
limit_usd
number
null
{"error": {"code": 402, "message": "Credit limit exceeded for this API key.", "metadata": {"limit_usd": 50.00, "used_usd": 50.01}}}
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \ -H "Authorization: Bearer lr_admin_xxxx" \ -H "Content-Type: application/json" \ -d '{"rate_limit": {"requests_per_minute": 60, "requests_per_day": 1000}}'
requests_per_minute
integer
requests_per_day
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \ -H "Authorization: Bearer lr_admin_xxxx" \ -H "Content-Type: application/json" \ -d '{"allowed_models": ["openai/gpt-5.4", "anthropic/claude-sonnet-4.6", "google/gemini-2.5-flash"]}'
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \ -H "Authorization: Bearer lr_admin_xxxx" \ -H "Content-Type: application/json" \ -d '{"allowed_providers": ["OpenAI", "Anthropic"]}'
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \ -H "Authorization: Bearer lr_admin_xxxx" \ -H "Content-Type: application/json" \ -d '{"enforce_zdr": true}'
组织默认设置 └── API Key 覆盖 └── 每请求提供商对象