Replace a custom model
https://api.respan.ai/api/models/{model_name}/Replace editable fields for a custom model. The model_name path value remains the identifier.
Servers
https://api.respan.ai — Respan API Server
Authentication
RespanApiKey
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
HTTP scheme: bearer; format: Respan API key.
Authorization: Bearer $RESPAN_API_KEYOr:
DashboardJwt
Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.
HTTP scheme: bearer; format: Dashboard JWT.
Authorization: Bearer $RESPAN_DASHBOARD_JWTPath parameters
model_name string Requiredopenai/gpt-4o-mini.Request body
A request body is required.
application/json
$ object Required body
base_model_name string OptionalExample:
"gpt-4o"custom_provider_id string OptionalExample:
"my-vllm"provider_id string Optionalcustom_provider_id.Example:
"my-vllm"input_cost number OptionalExample:
2.5output_cost number OptionalExample:
10cache_hit_input_cost number Optionalcache_creation_input_cost number Optionalmax_context_window integer OptionalExample:
128000function_call integer Optional0, 1image_support integer Optional0, 1supported_params_override object Optionalsupported_params entries (name, type, default, range with min and max, description, required), or null to remove the parameter. Replaces any earlier override. The response returns the computed supported_params.Additional properties are allowed
OpenAPI request schema
{
"type": "object",
"properties": {
"base_model_name": {
"type": "string",
"description": "Base model to inherit properties from.",
"example": "gpt-4o"
},
"custom_provider_id": {
"type": "string",
"description": "Custom provider string ID or provider identifier to associate.",
"example": "my-vllm"
},
"provider_id": {
"type": "string",
"description": "Alternative to `custom_provider_id`.",
"example": "my-vllm"
},
"input_cost": {
"type": "number",
"description": "Cost per 1M input tokens in USD.",
"example": 2.5
},
"output_cost": {
"type": "number",
"description": "Cost per 1M output tokens in USD.",
"example": 10
},
"cache_hit_input_cost": {
"type": "number",
"description": "Cost per 1M cached input tokens in USD."
},
"cache_creation_input_cost": {
"type": "number",
"description": "Cost per 1M cache creation input tokens in USD."
},
"max_context_window": {
"type": "integer",
"description": "Maximum context window size.",
"example": 128000
},
"function_call": {
"type": "integer",
"enum": [
0,
1
]
},
"image_support": {
"type": "integer",
"enum": [
0,
1
]
},
"supported_params_override": {
"type": "object",
"description": "Partial override for the model's parameters: a map of parameter name to a parameter definition with the same shape as `supported_params` entries (`name`, `type`, `default`, `range` with `min` and `max`, `description`, `required`), or `null` to remove the parameter. Replaces any earlier override. The response returns the computed `supported_params`.",
"additionalProperties": true
}
}
}Responses
200
Updated model.
application/json
$ object Body
id string Required in parentmodel_name.Example:
"my-custom-gpt-4o"model_name string Required in parentExample:
"my-custom-gpt-4o"base_model_name string OptionalExample:
"gpt-4o"affiliation_category string Optionalkeywordsai for built-in models, custom for your organization’s models.Allowed:
"keywordsai", "custom"Example:
"custom"is_called_by_custom_name boolean OptionalExample:
falseinput_cost number Optionalpricing.current.input.list_price.Deprecated
Example:
2.5output_cost number Optionalpricing.current.output.list_price.Deprecated
Example:
10cache_hit_input_cost number Optionalpricing.current.cache_read.list_price.Deprecated
Example:
0.5cache_creation_input_cost number Optionalpricing.current.cache_creation.list_price.Deprecated
Example:
3max_context_window integer OptionalExample:
128000function_call integer Optional0 = no, 1 = yes.Allowed:
0, 1Example:
1image_support integer Optional0 = no, 1 = yes.Allowed:
0, 1Example:
1model_type string OptionalAllowed:
"chat", "embedding", "audio"Example:
"chat"supported_params object OptionalAdditional properties are allowed
provider object Optional
provider.id string Required in parentprovider_id.Example:
"my-vllm"provider.provider_id string Required in parentExample:
"my-vllm"provider.provider_name string Required in parentExample:
"My vLLM Server"provider.extra_kwargs object Optionalbase_url and timeout values. Secret values are not returned here.Additional properties are allowed
Example:
{"base_url":"https://vllm.example.com/v1"}provider.created_at string or null Optionaldate-timeprovider.updated_at string or null Optionaldate-timepricing object Optional
pricing (allOf 1) object Schema variant
unit_prices.Reference:
#/components/schemas/ModelDetailPricingpricing (allOf 1).current object Required in parent
null.Reference:
#/components/schemas/CurrentPricingpricing (allOf 1).current.input object or null Required in parent
pricing (allOf 1).current.input (allOf 1) object Schema variant
pricing.current.Reference:
#/components/schemas/PriceSidepricing (allOf 1).current.input (allOf 1).price number Required in parentExample:
2.5pricing (allOf 1).current.input (allOf 1).list_price number Required in parentExample:
2.5pricing (allOf 1).current.input (allOf 1).unit string Required in parenttoken is 1M tokens, character is 1M characters, the others are one image, second, minute or hour.Reference:
#/components/schemas/PriceUnitAllowed:
"token", "image", "second", "minute", "hour", "character", "request", "megapixel_second"pricing (allOf 1).current.output object or null Required in parent
pricing (allOf 1).current.output (allOf 1) object Schema variant
pricing.current.Reference:
#/components/schemas/PriceSidepricing (allOf 1).current.output (allOf 1).price number Required in parentExample:
2.5pricing (allOf 1).current.output (allOf 1).list_price number Required in parentExample:
2.5pricing (allOf 1).current.output (allOf 1).unit string Required in parenttoken is 1M tokens, character is 1M characters, the others are one image, second, minute or hour.Reference:
#/components/schemas/PriceUnitAllowed:
"token", "image", "second", "minute", "hour", "character", "request", "megapixel_second"pricing (allOf 1).current.cache_read object or null Required in parent
pricing (allOf 1).current.cache_read (allOf 1) object Schema variant
pricing.current.Reference:
#/components/schemas/PriceSidepricing (allOf 1).current.cache_read (allOf 1).price number Required in parentExample:
2.5pricing (allOf 1).current.cache_read (allOf 1).list_price number Required in parentExample:
2.5pricing (allOf 1).current.cache_read (allOf 1).unit string Required in parenttoken is 1M tokens, character is 1M characters, the others are one image, second, minute or hour.Reference:
#/components/schemas/PriceUnitAllowed:
"token", "image", "second", "minute", "hour", "character", "request", "megapixel_second"pricing (allOf 1).current.cache_creation object or null Required in parent
pricing (allOf 1).current.cache_creation (allOf 1) object Schema variant
pricing.current.Reference:
#/components/schemas/PriceSidepricing (allOf 1).current.cache_creation (allOf 1).price number Required in parentExample:
2.5pricing (allOf 1).current.cache_creation (allOf 1).list_price number Required in parentExample:
2.5pricing (allOf 1).current.cache_creation (allOf 1).unit string Required in parenttoken is 1M tokens, character is 1M characters, the others are one image, second, minute or hour.Reference:
#/components/schemas/PriceUnitAllowed:
"token", "image", "second", "minute", "hour", "character", "request", "megapixel_second"pricing (allOf 1).current.schedule_multiplier number or null Required in parentnull without a schedule.pricing (allOf 1).current.valid_until string or null Required in parentnull without one.Format:
date-timepricing (allOf 1).sheet object Required in parent
Reference:
#/components/schemas/PriceSheetpricing (allOf 1).sheet.blocks array<object> Required in parent
pricing (allOf 1).sheet.blocks[] object Array item
#/components/schemas/PriceSheetBlockpricing (allOf 1).sheet.blocks[].prompt_tokens_above integer or null Required in parentnull for the base.pricing (allOf 1).sheet.blocks[].schedule_multiplier number or null Required in parentnull without a schedule.pricing (allOf 1).sheet.blocks[].windows array<object> or null Required in parent
null for all other times.pricing (allOf 1).sheet.blocks[].windows[] object Array item
Reference:
#/components/schemas/PriceSheetWindowpricing (allOf 1).sheet.blocks[].windows[].start string Required in parentdate-timepricing (allOf 1).sheet.blocks[].windows[].end string Required in parentdate-timepricing (allOf 1).sheet.blocks[].lines array<object> Required in parent
pricing (allOf 1).sheet.blocks[].lines[] object Array item
#/components/schemas/PriceSheetLinepricing (allOf 1).sheet.blocks[].lines[].dimension string Required in parentinput, output, cache_read or cache_creation.Example:
"input"pricing (allOf 1).sheet.blocks[].lines[].price number Required in parentExample:
2.5pricing (allOf 1).sheet.blocks[].lines[].list_price number Required in parentExample:
2.5pricing (allOf 1).sheet.blocks[].lines[].unit string Required in parenttoken, image, second or request.Example:
"token"pricing (allOf 1).sheet.blocks[].lines[].conditions array<object> Required in parent
pricing (allOf 1).sheet.blocks[].lines[].conditions[] object Array item
Reference:
#/components/schemas/PriceConditionpricing (allOf 1).sheet.blocks[].lines[].conditions[].key string Required in parent"cache_ttl"pricing (allOf 1).sheet.blocks[].lines[].conditions[].value any Required in parentExample:
"1h"pricing (allOf 1).sheet.multipliers array<object> Required in parent
pricing (allOf 1).sheet.multipliers[] object Array item
pricing (allOf 1).sheet.multipliers[].conditions array<object> Required in parent
pricing (allOf 1).sheet.multipliers[].conditions[] object Array item
Reference:
#/components/schemas/PriceConditionpricing (allOf 1).sheet.multipliers[].conditions[].key string Required in parent"cache_ttl"pricing (allOf 1).sheet.multipliers[].conditions[].value any Required in parentExample:
"1h"pricing (allOf 1).sheet.multipliers[].multiplier number Required in parentunit_prices object Optionalpricing is resolved from. Read-only: set prices with the cost fields on the request.Additional properties are allowed
Example:
{"entries":[{"dimension":"input","unit":"token","price":2.5},{"dimension":"output","unit":"token","price":10}]}OpenAPI response schema
{
"type": "object",
"required": [
"id",
"model_name"
],
"properties": {
"id": {
"type": "string",
"description": "Model string ID. Same value as `model_name`.",
"example": "my-custom-gpt-4o"
},
"model_name": {
"type": "string",
"description": "Model name used in API calls.",
"example": "my-custom-gpt-4o"
},
"base_model_name": {
"type": "string",
"description": "Base model inherited from, when configured.",
"example": "gpt-4o"
},
"affiliation_category": {
"type": "string",
"description": "`keywordsai` for built-in models, `custom` for your organization's models.",
"enum": [
"keywordsai",
"custom"
],
"example": "custom"
},
"is_called_by_custom_name": {
"type": "boolean",
"description": "Whether requests are sent upstream using this custom model name.",
"example": false
},
"input_cost": {
"type": "number",
"description": "Input list price per 1M tokens in USD. Same as `pricing.current.input.list_price`.",
"example": 2.5,
"deprecated": true
},
"output_cost": {
"type": "number",
"description": "Output list price per 1M tokens in USD. Same as `pricing.current.output.list_price`.",
"example": 10,
"deprecated": true
},
"cache_hit_input_cost": {
"type": "number",
"description": "Cached input list price per 1M tokens in USD. Same as `pricing.current.cache_read.list_price`.",
"example": 0.5,
"deprecated": true
},
"cache_creation_input_cost": {
"type": "number",
"description": "Cache creation input list price per 1M tokens in USD. Same as `pricing.current.cache_creation.list_price`.",
"example": 3,
"deprecated": true
},
"max_context_window": {
"type": "integer",
"description": "Maximum context window size.",
"example": 128000
},
"function_call": {
"type": "integer",
"enum": [
0,
1
],
"description": "Function/tool calling support. `0` = no, `1` = yes.",
"example": 1
},
"image_support": {
"type": "integer",
"enum": [
0,
1
],
"description": "Vision input support. `0` = no, `1` = yes.",
"example": 1
},
"model_type": {
"type": "string",
"description": "Model type.",
"enum": [
"chat",
"embedding",
"audio"
],
"example": "chat"
},
"supported_params": {
"type": "object",
"description": "Computed parameter support after applying model-specific overrides.",
"additionalProperties": true
},
"provider": {
"type": "object",
"required": [
"id",
"provider_id",
"provider_name"
],
"properties": {
"id": {
"type": "string",
"description": "Provider string ID. Same value as `provider_id`.",
"example": "my-vllm"
},
"provider_id": {
"type": "string",
"description": "Unique provider identifier within your organization.",
"example": "my-vllm"
},
"provider_name": {
"type": "string",
"description": "Human-readable provider name.",
"example": "My vLLM Server"
},
"extra_kwargs": {
"type": "object",
"description": "Provider configuration such as `base_url` and timeout values. Secret values are not returned here.",
"additionalProperties": true,
"example": {
"base_url": "https://vllm.example.com/v1"
}
},
"created_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"nullable": true
}
},
"additionalProperties": true
},
"pricing": {
"allOf": [
{
"$ref": "#/components/schemas/ModelDetailPricing"
}
],
"description": "The model's prices as the gateway bills them. Read prices from here rather than from the cost fields."
},
"unit_prices": {
"type": "object",
"additionalProperties": true,
"description": "The stored price entries, multipliers and schedule that `pricing` is resolved from. Read-only: set prices with the cost fields on the request.",
"example": {
"entries": [
{
"dimension": "input",
"unit": "token",
"price": 2.5
},
{
"dimension": "output",
"unit": "token",
"price": 10
}
]
}
}
},
"additionalProperties": true
}400
Bad Request
application/json
$ object Body
detail string Optionalerror string OptionalOpenAPI response schema
{
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"error": {
"type": "string"
}
}
}Example
{
"error": "Invalid request"
}403
The API key is missing, invalid or expired, or it doesn’t have permission for this action.
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}404
Not Found
application/json
$ object Body
detail string Optionalerror string OptionalOpenAPI response schema
{
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"error": {
"type": "string"
}
}
}Example
{
"error": "Not found"
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "Replace a custom model",
"operationId": "replaceCustomModel",
"tags": [
"Models"
],
"description": "Replace editable fields for a custom model. The `model_name` path value remains the identifier.",
"parameters": [
{
"name": "model_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Model name. The route supports names containing slashes, such as `openai/gpt-4o-mini`."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"base_model_name": {
"type": "string",
"description": "Base model to inherit properties from.",
"example": "gpt-4o"
},
"custom_provider_id": {
"type": "string",
"description": "Custom provider string ID or provider identifier to associate.",
"example": "my-vllm"
},
"provider_id": {
"type": "string",
"description": "Alternative to `custom_provider_id`.",
"example": "my-vllm"
},
"input_cost": {
"type": "number",
"description": "Cost per 1M input tokens in USD.",
"example": 2.5
},
"output_cost": {
"type": "number",
"description": "Cost per 1M output tokens in USD.",
"example": 10
},
"cache_hit_input_cost": {
"type": "number",
"description": "Cost per 1M cached input tokens in USD."
},
"cache_creation_input_cost": {
"type": "number",
"description": "Cost per 1M cache creation input tokens in USD."
},
"max_context_window": {
"type": "integer",
"description": "Maximum context window size.",
"example": 128000
},
"function_call": {
"type": "integer",
"enum": [
0,
1
]
},
"image_support": {
"type": "integer",
"enum": [
0,
1
]
},
"supported_params_override": {
"type": "object",
"description": "Partial override for the model's parameters: a map of parameter name to a parameter definition with the same shape as `supported_params` entries (`name`, `type`, `default`, `range` with `min` and `max`, `description`, `required`), or `null` to remove the parameter. Replaces any earlier override. The response returns the computed `supported_params`.",
"additionalProperties": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Updated model.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"model_name"
],
"properties": {
"id": {
"type": "string",
"description": "Model string ID. Same value as `model_name`.",
"example": "my-custom-gpt-4o"
},
"model_name": {
"type": "string",
"description": "Model name used in API calls.",
"example": "my-custom-gpt-4o"
},
"base_model_name": {
"type": "string",
"description": "Base model inherited from, when configured.",
"example": "gpt-4o"
},
"affiliation_category": {
"type": "string",
"description": "`keywordsai` for built-in models, `custom` for your organization's models.",
"enum": [
"keywordsai",
"custom"
],
"example": "custom"
},
"is_called_by_custom_name": {
"type": "boolean",
"description": "Whether requests are sent upstream using this custom model name.",
"example": false
},
"input_cost": {
"type": "number",
"description": "Input list price per 1M tokens in USD. Same as `pricing.current.input.list_price`.",
"example": 2.5,
"deprecated": true
},
"output_cost": {
"type": "number",
"description": "Output list price per 1M tokens in USD. Same as `pricing.current.output.list_price`.",
"example": 10,
"deprecated": true
},
"cache_hit_input_cost": {
"type": "number",
"description": "Cached input list price per 1M tokens in USD. Same as `pricing.current.cache_read.list_price`.",
"example": 0.5,
"deprecated": true
},
"cache_creation_input_cost": {
"type": "number",
"description": "Cache creation input list price per 1M tokens in USD. Same as `pricing.current.cache_creation.list_price`.",
"example": 3,
"deprecated": true
},
"max_context_window": {
"type": "integer",
"description": "Maximum context window size.",
"example": 128000
},
"function_call": {
"type": "integer",
"enum": [
0,
1
],
"description": "Function/tool calling support. `0` = no, `1` = yes.",
"example": 1
},
"image_support": {
"type": "integer",
"enum": [
0,
1
],
"description": "Vision input support. `0` = no, `1` = yes.",
"example": 1
},
"model_type": {
"type": "string",
"description": "Model type.",
"enum": [
"chat",
"embedding",
"audio"
],
"example": "chat"
},
"supported_params": {
"type": "object",
"description": "Computed parameter support after applying model-specific overrides.",
"additionalProperties": true
},
"provider": {
"type": "object",
"required": [
"id",
"provider_id",
"provider_name"
],
"properties": {
"id": {
"type": "string",
"description": "Provider string ID. Same value as `provider_id`.",
"example": "my-vllm"
},
"provider_id": {
"type": "string",
"description": "Unique provider identifier within your organization.",
"example": "my-vllm"
},
"provider_name": {
"type": "string",
"description": "Human-readable provider name.",
"example": "My vLLM Server"
},
"extra_kwargs": {
"type": "object",
"description": "Provider configuration such as `base_url` and timeout values. Secret values are not returned here.",
"additionalProperties": true,
"example": {
"base_url": "https://vllm.example.com/v1"
}
},
"created_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"nullable": true
}
},
"additionalProperties": true
},
"pricing": {
"allOf": [
{
"$ref": "#/components/schemas/ModelDetailPricing"
}
],
"description": "The model's prices as the gateway bills them. Read prices from here rather than from the cost fields."
},
"unit_prices": {
"type": "object",
"additionalProperties": true,
"description": "The stored price entries, multipliers and schedule that `pricing` is resolved from. Read-only: set prices with the cost fields on the request.",
"example": {
"entries": [
{
"dimension": "input",
"unit": "token",
"price": 2.5
},
{
"dimension": "output",
"unit": "token",
"price": 10
}
]
}
}
},
"additionalProperties": true
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"error": {
"type": "string"
}
}
},
"example": {
"error": "Invalid request"
}
}
}
},
"403": {
"description": "The API key is missing, invalid or expired, or it doesn't have permission for this action.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"error": {
"type": "string"
}
}
},
"example": {
"error": "Not found"
}
}
}
}
},
"security": [
{
"RespanApiKey": []
},
{
"DashboardJwt": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"schemas": {
"CurrentPricing": {
"type": "object",
"description": "What a plain request to the model pays at the time of the request. A dimension the model does not price, or whose price is hidden, is `null`.",
"required": [
"input",
"output",
"cache_read",
"cache_creation",
"schedule_multiplier",
"valid_until"
],
"properties": {
"input": {
"allOf": [
{
"$ref": "#/components/schemas/PriceSide"
}
],
"nullable": true,
"description": "Text input, else the first media input priced."
},
"output": {
"allOf": [
{
"$ref": "#/components/schemas/PriceSide"
}
],
"nullable": true,
"description": "Text output, else the first media output priced."
},
"cache_read": {
"allOf": [
{
"$ref": "#/components/schemas/PriceSide"
}
],
"nullable": true,
"description": "Cached input read."
},
"cache_creation": {
"allOf": [
{
"$ref": "#/components/schemas/PriceSide"
}
],
"nullable": true,
"description": "Cache write."
},
"schedule_multiplier": {
"type": "number",
"nullable": true,
"description": "The time-of-day multiplier in the prices; `null` without a schedule."
},
"valid_until": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "When the schedule next changes the prices; `null` without one."
}
}
},
"ModelDetailPricing": {
"type": "object",
"description": "The model's prices, resolved from `unit_prices`.",
"required": [
"current",
"sheet"
],
"properties": {
"current": {
"$ref": "#/components/schemas/CurrentPricing"
},
"sheet": {
"$ref": "#/components/schemas/PriceSheet"
}
}
},
"PriceCondition": {
"type": "object",
"description": "A condition a price depends on, such as a long prompt, a service tier or a resolution.",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"example": "cache_ttl"
},
"value": {
"description": "The value of the condition.",
"example": "1h"
}
}
},
"PriceSheet": {
"type": "object",
"description": "Every rate the model states: one block per long-prompt tier and schedule level.",
"required": [
"blocks",
"multipliers"
],
"properties": {
"blocks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PriceSheetBlock"
}
},
"multipliers": {
"type": "array",
"description": "Multipliers on every price when the conditions hold.",
"items": {
"type": "object",
"required": [
"conditions",
"multiplier"
],
"properties": {
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PriceCondition"
}
},
"multiplier": {
"type": "number"
}
}
}
}
}
},
"PriceSheetBlock": {
"type": "object",
"required": [
"prompt_tokens_above",
"schedule_multiplier",
"windows",
"lines"
],
"properties": {
"prompt_tokens_above": {
"type": "integer",
"nullable": true,
"description": "The long-prompt tier the block prices; `null` for the base."
},
"schedule_multiplier": {
"type": "number",
"nullable": true,
"description": "The schedule level the block prices; `null` without a schedule."
},
"windows": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/PriceSheetWindow"
},
"description": "This week's hours the level applies; `null` for all other times."
},
"lines": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PriceSheetLine"
}
}
}
},
"PriceSheetLine": {
"type": "object",
"required": [
"dimension",
"price",
"list_price",
"unit",
"conditions"
],
"properties": {
"dimension": {
"type": "string",
"description": "What is priced, such as `input`, `output`, `cache_read` or `cache_creation`.",
"example": "input"
},
"price": {
"type": "number",
"description": "After the Respan discount.",
"example": 2.5
},
"list_price": {
"type": "number",
"description": "Before the Respan discount.",
"example": 2.5
},
"unit": {
"type": "string",
"description": "What the price is quoted per, such as `token`, `image`, `second` or `request`.",
"example": "token"
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PriceCondition"
},
"description": "Conditions under which this price applies. Empty for the base price."
}
}
},
"PriceSheetWindow": {
"type": "object",
"description": "One occurrence this week of a schedule window.",
"required": [
"start",
"end"
],
"properties": {
"start": {
"type": "string",
"format": "date-time"
},
"end": {
"type": "string",
"format": "date-time"
}
}
},
"PriceSide": {
"type": "object",
"description": "One priced dimension of `pricing.current`.",
"required": [
"price",
"list_price",
"unit"
],
"properties": {
"price": {
"type": "number",
"description": "What a request pays: after the Respan discount, at the time-of-day schedule multiplier in effect at the time of the request.",
"example": 2.5
},
"list_price": {
"type": "number",
"description": "The same price before the discount.",
"example": 2.5
},
"unit": {
"$ref": "#/components/schemas/PriceUnit"
}
}
},
"PriceUnit": {
"type": "string",
"enum": [
"token",
"image",
"second",
"minute",
"hour",
"character",
"request",
"megapixel_second"
],
"description": "What a price is quoted per: `token` is 1M tokens, `character` is 1M characters, the others are one image, second, minute or hour."
}
},
"securitySchemes": {
"DashboardJwt": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Dashboard JWT",
"description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
"x-fern-bearer": {
"name": "dashboardJwt",
"env": "RESPAN_DASHBOARD_JWT"
}
},
"RespanApiKey": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Respan API key",
"description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
"x-fern-bearer": {
"name": "respanApiKey",
"env": "RESPAN_API_KEY"
}
}
}
}