본문으로 건너뛰기

한도 조회

GET/v1/limits

티어, 동시 실행과 대기열, 월 한도, 워크스페이스 지출 한도, API 요청 속도를 돌려줍니다

API 키 권한 read 또는 콘솔 세션으로 부릅니다, 콘솔 세션은 조직 역할 owner, admin, developer만 됩니다

참고 서버 구현(2026-10-12 dev 기준)이 계약 초안과 다른 점

  • workspace_id와 api_key_id 쿼리는 무시합니다

Headers

  • Authorization: optional string
    Bearer xci_live_… 워크스페이스 API 키, 키 권한 read(run 키도 가능), 콘솔 세션 쿠키로 대신할 수 있습니다

Query Parameters

  • org_id: optional string
    콘솔 세션은 필수, API 키는 무시(키의 조직)

Returns

200 application/json

  • Limits: object
    • organization_id: string
      조직 ID
    • tier: integer
      티어
    • tier_name: optional string
      티어 이름
    • concurrency: object { limit, running }
      동시 실행 한도와 지금 실행 수
      • limit: integer
        한도
      • running: integer
        실행 중
    • queue: object { limit, queued }
      대기열 상한과 지금 대기 수
      • limit: integer
        한도
      • queued: integer
        대기 중
    • monthly: object { limit_micro_usd, limit_usd, used_micro_usd, … }
      티어 월 한도와 사용액, limit이 null이면 상한 없음
      • limit_micro_usd: optional integer or null
        금액(µUSD 정수)
        최소 0
      • limit_usd: optional string or null
        같은 금액의 USD 문자열(센트, 소수 2자리)
      • used_micro_usd: optional integer
        이번 달 정산액 + 실행 중인 잡이 이미 쓴 금액
        최소 0
      • used_usd: optional string
        같은 금액의 USD 문자열(센트, 소수 2자리)
        형식 ^-?[0-9]+\.[0-9]{2}$
      • resets_at: optional string
        다음 달 1일 00:00 UTC
        RFC 3339 UTC 시각
    • workspaces: array of object { workspace_id, name, monthly_limit_micro_usd, … }
      호출 범위의 워크스페이스별 지출 한도와 지출, API 키는 자기 것만
      • workspace_id: optional string
        워크스페이스 ID
      • name: optional string
        워크스페이스 이름
      • monthly_limit_micro_usd: optional integer or null
        월 지출 한도(µUSD 정수), 없으면 null
        최소 0
      • monthly_limit_usd: optional string or null
        같은 한도의 USD 문자열(센트, 소수 2자리)
      • month_spend_micro_usd: optional integer
        이번 달 지출(µUSD 정수, 1 USD = 1,000,000)
        최소 0
      • month_spend_usd: optional string
        같은 금액의 USD 문자열(센트, 소수 2자리, µUSD에서 반올림), 예 "20.00"
        형식 ^-?[0-9]+\.[0-9]{2}$
    • api_requests: object { enforced, window_seconds, alert_threshold_requests, … }
      API 키 요청 속도, 아직 강제하지 않고(enforced false) 창 안에서 기준을 넘으면 소유자와 관리자에게 급증 메일만 갑니다
      • enforced: boolean
        강제 여부
      • window_seconds: integer
        창 길이(초)
      • alert_threshold_requests: integer
        알림 기준 요청 수
      • requests_in_window: optional integer
        최근 창 안에서 기록된 키 요청 수
    • next_tier: optional Tier { tier, name, min_cumulative_topup_micro_usd, … } or null
      다음 티어 조건, 없으면 null
      • tier: integer
        티어 번호, 1부터
        최소 1
      • name: optional string
        티어 이름
      • min_cumulative_topup_micro_usd: integer
        진입 누적 충전액
        최소 0
      • min_cumulative_topup_usd: string
        같은 금액의 USD 문자열(센트, 소수 2자리)
        형식 ^-?[0-9]+\.[0-9]{2}$
      • max_concurrent_jobs: integer
        동시 실행 잡 수
        최소 1
      • max_queued_jobs: optional integer
        조직 대기열 상한
      • monthly_limit_micro_usd: integer or null
        월 사용 한도, null이면 상한 없음(Custom)
      • monthly_limit_usd: string or null
        월 한도(USD 정수)
      • rate_discount_bp: optional integer
        이 티어의 러너 단가 할인(1/100 퍼센트), 지금은 0
        최소 0, 최대 9999

오류

  • invalid_request: HTTP 400
    본문이나 쿼리가 검증에 실패했습니다, error.details.fields에 문제 필드가 있습니다
  • api_key_required: HTTP 401
    API 키 엔드포인트에 Authorization: Bearer 헤더가 없습니다
  • api_key_revoked_leaked: HTTP 401
    공개 유출 신고로 자동 폐기된 키입니다, 새 키를 발급하세요
  • invalid_api_key: HTTP 401
    모르는 키이거나 폐기, 만료, 체크섬 불일치입니다(종료된 xeno_ 접두사 포함)
  • session_required: HTTP 401
    콘솔 엔드포인트를 유효한 콘솔 세션 쿠키 없이 불렀습니다
  • insufficient_permission: HTTP 403
    역할이나 키 권한(run/read)이 이 요청을 허용하지 않습니다
  • ip_not_allowed: HTTP 403
    요청 IP가 조직 또는 API 키의 IP 허용 목록 밖입니다, details.ip와 details.list(organization 또는 api_key)에 있습니다
  • organization_suspended: HTTP 403
    운영자가 조직을 정지했습니다, 키는 거부되고 실행 중인 잡은 멈춥니다
  • not_found: HTTP 404
    자원이 없거나 이 호출자에게 보이지 않습니다
  • rate_limited: HTTP 429, 다시 시도 가능
    이 키 또는 조직의 요청이 너무 많습니다, retry_after_s만큼 기다리세요
  • internal_error: HTTP 500, 다시 시도 가능
    예상하지 못한 오류입니다, 다시 시도하고 반복되면 request_id와 함께 알려 주세요

오류 봉투 모양과 전체 코드 표는 오류 코드에 있습니다

다음 단계