Aller au contenu

API console: admin-pricing

Cette page est générée à partir de server/api/openapi.yaml. Son contenu est en anglais ; ne la modifiez pas à la main.

Models and immutable price versions. Handlers: internal/admin/pricing.

List models

operationId adminListModels · auth: adminSession

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

Response 200 application/json — AdminModelList

  • data (array of AdminModel, required)
    • id (string, required)
    • slug (string, required)
    • quality_tier (integer, required) — Quality rating for model “auto”: 0 = not rated, 1 (lowest) to 10 (highest).
    • display_name (string, required)
    • vendor (string, required)
    • kind (ModelKind, required)
    • description (string, required)
    • context_window (integer, required) — 0 = unknown.
    • max_output_tokens (integer, required) — 0 = unknown.
    • input_modalities (array of string, required)
    • output_modalities (array of string, required)
    • capabilities (ModelCapabilities, required)
      • streaming (boolean, required)
      • tools (boolean, required)
      • vision (boolean, required)
      • audio_input (boolean, required)
      • audio_output (boolean, required)
      • documents (boolean, required)
      • reasoning (boolean, required)
      • prompt_caching (boolean, required)
      • structured_output (boolean, required)
      • web_search (boolean, required)
      • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
      • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
    • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
    • aliases (array of string, required)
    • tokenizer (string, required)
    • sort_order (integer, required)
    • price_version_id (string, required, nullable) — Current sell price; null = not for sale.
    • created_at (string, required)
    • updated_at (string, required)

Create a model

operationId adminCreateModel · auth: adminSession

Request body (required) application/json — ModelInput

  • slug (string, required)
  • display_name (string, required)
  • vendor (string)
  • kind (ModelKind, required)
  • description (string)
  • context_window (integer) — 0 = unknown.
  • max_output_tokens (integer) — 0 = unknown.
  • input_modalities (array of string)
  • output_modalities (array of string)
  • capabilities (ModelCapabilities, required)
    • streaming (boolean, required)
    • tools (boolean, required)
    • vision (boolean, required)
    • audio_input (boolean, required)
    • audio_output (boolean, required)
    • documents (boolean, required)
    • reasoning (boolean, required)
    • prompt_caching (boolean, required)
    • structured_output (boolean, required)
    • web_search (boolean, required)
    • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
    • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
  • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
  • aliases (array of string)
  • tokenizer (string) — Estimator hint: o200k_base, cl100k_base, claude, gemini or empty.
  • sort_order (integer)
  • quality_tier (integer, minimum: 0, maximum: 10) — Quality rating for model “auto” (preference quality / balanced): 0 = not rated, 1 (lowest) to 10 (highest). Omitted on update = unchanged.
Status Meaning Body
201 OK application/json AdminModel
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 201 application/json — AdminModel

  • id (string, required)
  • slug (string, required)
  • quality_tier (integer, required) — Quality rating for model “auto”: 0 = not rated, 1 (lowest) to 10 (highest).
  • display_name (string, required)
  • vendor (string, required)
  • kind (ModelKind, required)
  • description (string, required)
  • context_window (integer, required) — 0 = unknown.
  • max_output_tokens (integer, required) — 0 = unknown.
  • input_modalities (array of string, required)
  • output_modalities (array of string, required)
  • capabilities (ModelCapabilities, required)
    • streaming (boolean, required)
    • tools (boolean, required)
    • vision (boolean, required)
    • audio_input (boolean, required)
    • audio_output (boolean, required)
    • documents (boolean, required)
    • reasoning (boolean, required)
    • prompt_caching (boolean, required)
    • structured_output (boolean, required)
    • web_search (boolean, required)
    • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
    • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
  • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
  • aliases (array of string, required)
  • tokenizer (string, required)
  • sort_order (integer, required)
  • price_version_id (string, required, nullable) — Current sell price; null = not for sale.
  • created_at (string, required)
  • updated_at (string, required)

Get a model

operationId adminGetModel · auth: adminSession

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

Response 200 application/json — AdminModel

  • id (string, required)
  • slug (string, required)
  • quality_tier (integer, required) — Quality rating for model “auto”: 0 = not rated, 1 (lowest) to 10 (highest).
  • display_name (string, required)
  • vendor (string, required)
  • kind (ModelKind, required)
  • description (string, required)
  • context_window (integer, required) — 0 = unknown.
  • max_output_tokens (integer, required) — 0 = unknown.
  • input_modalities (array of string, required)
  • output_modalities (array of string, required)
  • capabilities (ModelCapabilities, required)
    • streaming (boolean, required)
    • tools (boolean, required)
    • vision (boolean, required)
    • audio_input (boolean, required)
    • audio_output (boolean, required)
    • documents (boolean, required)
    • reasoning (boolean, required)
    • prompt_caching (boolean, required)
    • structured_output (boolean, required)
    • web_search (boolean, required)
    • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
    • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
  • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
  • aliases (array of string, required)
  • tokenizer (string, required)
  • sort_order (integer, required)
  • price_version_id (string, required, nullable) — Current sell price; null = not for sale.
  • created_at (string, required)
  • updated_at (string, required)

Replace a model

operationId adminUpdateModel · auth: adminSession

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

Request body (required) application/json — ModelInput

  • slug (string, required)
  • display_name (string, required)
  • vendor (string)
  • kind (ModelKind, required)
  • description (string)
  • context_window (integer) — 0 = unknown.
  • max_output_tokens (integer) — 0 = unknown.
  • input_modalities (array of string)
  • output_modalities (array of string)
  • capabilities (ModelCapabilities, required)
    • streaming (boolean, required)
    • tools (boolean, required)
    • vision (boolean, required)
    • audio_input (boolean, required)
    • audio_output (boolean, required)
    • documents (boolean, required)
    • reasoning (boolean, required)
    • prompt_caching (boolean, required)
    • structured_output (boolean, required)
    • web_search (boolean, required)
    • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
    • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
  • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
  • aliases (array of string)
  • tokenizer (string) — Estimator hint: o200k_base, cl100k_base, claude, gemini or empty.
  • sort_order (integer)
  • quality_tier (integer, minimum: 0, maximum: 10) — Quality rating for model “auto” (preference quality / balanced): 0 = not rated, 1 (lowest) to 10 (highest). Omitted on update = unchanged.
Status Meaning Body
200 OK application/json AdminModel
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — AdminModel

  • id (string, required)
  • slug (string, required)
  • quality_tier (integer, required) — Quality rating for model “auto”: 0 = not rated, 1 (lowest) to 10 (highest).
  • display_name (string, required)
  • vendor (string, required)
  • kind (ModelKind, required)
  • description (string, required)
  • context_window (integer, required) — 0 = unknown.
  • max_output_tokens (integer, required) — 0 = unknown.
  • input_modalities (array of string, required)
  • output_modalities (array of string, required)
  • capabilities (ModelCapabilities, required)
    • streaming (boolean, required)
    • tools (boolean, required)
    • vision (boolean, required)
    • audio_input (boolean, required)
    • audio_output (boolean, required)
    • documents (boolean, required)
    • reasoning (boolean, required)
    • prompt_caching (boolean, required)
    • structured_output (boolean, required)
    • web_search (boolean, required)
    • builtin_tools (array of string) — Provider-executed tool types other than web search that requests may use (for example code_execution_20250522). An entry ending in * matches by prefix. Empty or absent allows none.
    • service_tiers (array of string) — Non-default service tiers requests may ask for (for example flex, priority). An entry ending in * matches by prefix. Empty or absent allows none.
  • status (ModelStatus, required) — hidden: routable but unlisted. deprecated: listed with a marker. disabled: not routable.
  • aliases (array of string, required)
  • tokenizer (string, required)
  • sort_order (integer, required)
  • price_version_id (string, required, nullable) — Current sell price; null = not for sale.
  • created_at (string, required)
  • updated_at (string, required)

Sell price history of a model

operationId adminListModelPrices · auth: adminSession

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

Response 200 application/json — PriceVersionList

  • data (array of PriceVersion, required)
    • id (string, required)
    • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
    • model_id (string, required, nullable)
    • offering_id (string, required, nullable)
    • note (string, required)
    • created_by (string, required, nullable)
    • created_at (string, required)
    • current (boolean, required) — The subject currently points at this version.
    • tiers (array of PriceTier, required)
      • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
      • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
      • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
      • reasoning_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • cache_read_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • cache_write_5m_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • cache_write_1h_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
      • image_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • audio_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • image_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • audio_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • input_chars_per_million (string, required, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
      • request_nano (string, required, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
      • web_search_nano (string, required, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
      • image_nano (string, required, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
      • image_variants (map of string, required) — Per-image price by <quality>:<size>, nano-USD strings.
      • audio_input_second_nano (string, required, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
      • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
      • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
      • id (string, required)

Publish a new sell price version

operationId adminCreateModelPrice · auth: adminSession

Creates an immutable version and makes it current. Requests in flight keep the version they pinned.

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

Request body (required) application/json — PriceVersionInput

  • note (string)
  • tiers (array of PriceTierInput, required, minItems: 1)
    • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
    • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • reasoning_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • cache_read_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_5m_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_1h_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
    • image_input_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • audio_input_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • image_output_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • audio_output_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • input_chars_per_million (string, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
    • request_nano (string, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
    • web_search_nano (string, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
    • image_nano (string, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
    • image_variants (map of string) — Per-image price by <quality>:<size>, nano-USD strings.
    • audio_input_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
    • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
    • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
Status Meaning Body
201 OK application/json PriceVersion
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 201 application/json — PriceVersion

  • id (string, required)
  • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
  • model_id (string, required, nullable)
  • offering_id (string, required, nullable)
  • note (string, required)
  • created_by (string, required, nullable)
  • created_at (string, required)
  • current (boolean, required) — The subject currently points at this version.
  • tiers (array of PriceTier, required)
    • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
    • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • reasoning_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • cache_read_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_5m_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_1h_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
    • image_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • audio_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • image_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • audio_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • input_chars_per_million (string, required, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
    • request_nano (string, required, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
    • web_search_nano (string, required, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
    • image_nano (string, required, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
    • image_variants (map of string, required) — Per-image price by <quality>:<size>, nano-USD strings.
    • audio_input_second_nano (string, required, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
    • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
    • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
    • id (string, required)

Price history of an offering

operationId adminListOfferingPrices · auth: adminSession

Parameter In Type Required Description
offering_id path string<uuid> yes
kind query PriceKind no Default sell.
Status Meaning Body
200 OK application/json PriceVersionList
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — PriceVersionList

  • data (array of PriceVersion, required)
    • id (string, required)
    • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
    • model_id (string, required, nullable)
    • offering_id (string, required, nullable)
    • note (string, required)
    • created_by (string, required, nullable)
    • created_at (string, required)
    • current (boolean, required) — The subject currently points at this version.
    • tiers (array of PriceTier, required)
      • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
      • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
      • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
      • reasoning_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • cache_read_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • cache_write_5m_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • cache_write_1h_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
      • image_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • audio_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
      • image_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • audio_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
      • input_chars_per_million (string, required, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
      • request_nano (string, required, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
      • web_search_nano (string, required, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
      • image_nano (string, required, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
      • image_variants (map of string, required) — Per-image price by <quality>:<size>, nano-USD strings.
      • audio_input_second_nano (string, required, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
      • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
      • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
      • id (string, required)

Publish a sell override or a cost price for an offering

operationId adminCreateOfferingPrice · auth: adminSession

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

Request body (required) application/json — OfferingPriceInput

  • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
  • note (string)
  • tiers (array of PriceTierInput, required, minItems: 1)
    • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
    • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • reasoning_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • cache_read_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_5m_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_1h_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
    • image_input_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • audio_input_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • image_output_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • audio_output_per_million (string, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • input_chars_per_million (string, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
    • request_nano (string, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
    • web_search_nano (string, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
    • image_nano (string, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
    • image_variants (map of string) — Per-image price by <quality>:<size>, nano-USD strings.
    • audio_input_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
    • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
    • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
Status Meaning Body
201 OK application/json PriceVersion
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 201 application/json — PriceVersion

  • id (string, required)
  • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
  • model_id (string, required, nullable)
  • offering_id (string, required, nullable)
  • note (string, required)
  • created_by (string, required, nullable)
  • created_at (string, required)
  • current (boolean, required) — The subject currently points at this version.
  • tiers (array of PriceTier, required)
    • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
    • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • reasoning_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • cache_read_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_5m_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_1h_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
    • image_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • audio_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • image_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • audio_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • input_chars_per_million (string, required, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
    • request_nano (string, required, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
    • web_search_nano (string, required, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
    • image_nano (string, required, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
    • image_variants (map of string, required) — Per-image price by <quality>:<size>, nano-USD strings.
    • audio_input_second_nano (string, required, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
    • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
    • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
    • id (string, required)

DELETE /api/v1/admin/offerings/{offering_id}/prices/sell

Section intitulée « DELETE /api/v1/admin/offerings/{offering_id}/prices/sell »

Remove the sell price override

operationId adminClearOfferingSellPrice · auth: adminSession

The model price applies again; the versions are kept.

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

GET /api/v1/admin/price-versions/{price_version_id}

Section intitulée « GET /api/v1/admin/price-versions/{price_version_id} »

Get a price version

operationId adminGetPriceVersion · auth: adminSession

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

Response 200 application/json — PriceVersion

  • id (string, required)
  • kind (PriceKind, required) — sell: what customers pay. cost: what the upstream charges.
  • model_id (string, required, nullable)
  • offering_id (string, required, nullable)
  • note (string, required)
  • created_by (string, required, nullable)
  • created_at (string, required)
  • current (boolean, required) — The subject currently points at this version.
  • tiers (array of PriceTier, required)
    • min_context_tokens (integer, required) — The tier applies to prompts of at least this many tokens. Exactly one tier has 0.
    • input_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • output_per_million (PricePerMillion, required, pattern: ”^[0-9]+$”) — A price in nano-USD per 1,000,000 units (tokens or characters), as a decimal integer string.
    • reasoning_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • cache_read_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_5m_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • cache_write_1h_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = 5-minute cache write price, then input price.
    • image_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • audio_input_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = input price.
    • image_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • audio_output_per_million (string, required, pattern: ”^[0-9]+$”, nullable) — Null = output price.
    • input_chars_per_million (string, required, pattern: ”^[0-9]+$”) — Per million input characters (character-priced speech models). (Nano-USD per million units, integer string.)
    • request_nano (string, required, pattern: ”^-?[0-9]+$”) — Flat fee per billable request. (Nano-USD, integer string.)
    • web_search_nano (string, required, pattern: ”^-?[0-9]+$”) — Per provider-executed web search call. (Nano-USD, integer string.)
    • image_nano (string, required, pattern: ”^-?[0-9]+$”) — Per generated image unless image_variants has the variant. (Nano-USD, integer string.)
    • image_variants (map of string, required) — Per-image price by <quality>:<size>, nano-USD strings.
    • audio_input_second_nano (string, required, pattern: ”^-?[0-9]+$”) — Per second of input audio. (Nano-USD, integer string.)
    • video_second_nano (string, pattern: ”^-?[0-9]+$”) — Per second of generated video unless video_variants has the resolution. Absent = 0. (Nano-USD, integer string.)
    • video_variants (map of string) — Per-second video price by resolution <width>x<height>, nano-USD strings.
    • id (string, required)