메인 콘텐츠로 건너뛰기
ARouter 가드레일을 통해 조직 관리자는 조직 내 모든 API key 및 모든 요청에 적용되는 정책을 강제할 수 있습니다.

가드레일이 적용하는 내용

제어 항목설명
모델 허용 목록멤버가 사용할 수 있는 모델 제한
제공업체 허용 목록요청이 라우팅될 수 있는 제공업체 제한
지출 한도키별 및 조직별 예산 상한
요청 속도 제한키 또는 멤버별 요청 속도 제한
데이터 정책ZDR 강제 적용, 데이터 수집 제한

지출 한도

모든 API key에 크레딧 한도를 설정합니다. 한도를 초과하는 요청은 402 오류로 거부됩니다.

대시보드에서

API Keys → 키 편집 → 크레딧 한도 설정.

API를 통해

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_usdnumber최대 누적 지출(USD). 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_minuteinteger분당 최대 요청 수. null = 무제한.
requests_per_dayinteger일당 최대 요청 수. null = 무제한.

모델 허용 목록

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 재정의
        └── 요청별 제공업체 객체

관련 문서