curl -X POST https://api.arouter.ai/api/v1/keys \
-H "Authorization: Bearer lr_mgmt_xxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "production-backend",
"allowed_providers": ["openai", "anthropic"],
"limit": 150,
"limit_reset": "monthly",
"expires_at": "2025-12-31T23:59:59Z"
}'
Create a new API key with optional provider/model restrictions, rate limits, and expiry.
curl -X POST https://api.arouter.ai/api/v1/keys \
-H "Authorization: Bearer lr_mgmt_xxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "production-backend",
"allowed_providers": ["openai", "anthropic"],
"limit": 150,
"limit_reset": "monthly",
"expires_at": "2025-12-31T23:59:59Z"
}'
curl -X POST https://api.arouter.ai/api/v1/keys \
-H "Authorization: Bearer lr_mgmt_xxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "production-backend",
"allowed_providers": ["openai", "anthropic"],
"limit": 150,
"limit_reset": "monthly",
"expires_at": "2025-12-31T23:59:59Z"
}'