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 覆蓋 └── 每請求提供商物件