Ir al contenido

API de consola: admin-plan-tier

Esta página se genera a partir de server/api/openapi.yaml. Su contenido está en inglés; no la edites a mano.

V3 B4. Plan tier attributes for operators. Handlers: internal/admin/plantier.

Tier attributes of every plan that has them

operationId adminPlanTierList · auth: adminSession

Status Meaning Body
200 OK application/json PlanTierList
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — PlanTierList

  • data (array of PlanTier, required)
    • plan_id (string, required)
    • limits (PlanTierLimits, required) — 0 = no cap from the plan.
      • rpm (integer, required, minimum: 0)
      • tpm (integer, required, minimum: 0)
      • concurrency (integer, required, minimum: 0)
    • model_allowlist (array of string, required, nullable)
    • production_use_allowed (boolean, required)
    • updated_at (string, required)

A plan’s tier attributes

operationId adminPlanTierGet · auth: adminSession

Parameter In Type Required Description
plan_id path string<uuid> yes
Status Meaning Body
200 OK application/json PlanTier
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — PlanTier

  • plan_id (string, required)
  • limits (PlanTierLimits, required) — 0 = no cap from the plan.
    • rpm (integer, required, minimum: 0)
    • tpm (integer, required, minimum: 0)
    • concurrency (integer, required, minimum: 0)
  • model_allowlist (array of string, required, nullable)
  • production_use_allowed (boolean, required)
  • updated_at (string, required)

Set a plan’s tier attributes

operationId adminPlanTierSet · auth: adminSession

Attributes only restrict: rate caps tighten the organisation’s limits (0 = no cap from the plan), the model allowlist intersects every API key’s allowlist (null = all models) and production_use_allowed = false marks a plan whose terms forbid production traffic. They apply to organisations with an active, past_due, unpaid or paused subscription of the plan, within 30 seconds of a change on every gateway. Prices stay on the plan.

Parameter In Type Required Description
plan_id path string<uuid> yes

Request body (required) application/json — PlanTierInput

  • limits (PlanTierLimits, required) — 0 = no cap from the plan.
    • rpm (integer, required, minimum: 0)
    • tpm (integer, required, minimum: 0)
    • concurrency (integer, required, minimum: 0)
  • model_allowlist (array of string, required, maxItems: 200, nullable) — Model slugs, a trailing * is a prefix wildcard; null = all models. Must not be empty when set.
  • production_use_allowed (boolean, required)
Status Meaning Body
200 OK application/json PlanTier
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — PlanTier

  • plan_id (string, required)
  • limits (PlanTierLimits, required) — 0 = no cap from the plan.
    • rpm (integer, required, minimum: 0)
    • tpm (integer, required, minimum: 0)
    • concurrency (integer, required, minimum: 0)
  • model_allowlist (array of string, required, nullable)
  • production_use_allowed (boolean, required)
  • updated_at (string, required)

Remove a plan’s tier attributes (the plan restricts nothing)

operationId adminPlanTierDelete · auth: adminSession

Parameter In Type Required Description
plan_id path string<uuid> yes
Status Meaning Body
204 Removed —
default Error envelope. The HTTP status follows the error kind. application/json Error