List models
https://api.respan.ai/api/v1/modelsReturns the models available through the Respan gateway, in the OpenAI model list format.
Without an API key, the response lists every public model. With an API key, it lists the models your project can use.
Servers
https://api.respan.ai: Respan API Server
Authentication
Authentication is optional.
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_KEYResponses
200
The model list.
application/json
$ object Body
#/components/schemas/OpenAIModelListobject string Required in parent"list"Example:
"list"data array<object> Required in parent
data[] object Array item
#/components/schemas/OpenAIModeldata[].id string Required in parentmodel in gateway requests.Example:
"gpt-4o-mini"data[].object string Required in parent"model"Example:
"model"data[].created integer Required in parent0 if unknown.Example:
1721260800data[].owned_by string Required in parentExample:
"openai"data[].context_length integer or null Required in parentnull if unknown.Example:
128000data[].pricing object Required in parent
Reference:
#/components/schemas/OpenAIModelPricingdata[].pricing.input_cost number or null Required in parentinput_price_unit, after the Respan discount and the time-of-day schedule in effect now. Token and character prices are per 1M.Example:
0.15data[].pricing.output_cost number or null Required in parentoutput_price_unit, after the Respan discount and the time-of-day schedule in effect now. Token and character prices are per 1M.Example:
0.6data[].pricing.input_price_unit string Required in parentinput_cost.Allowed:
"token", "image", "second", "minute", "hour", "character"Example:
"token"data[].pricing.output_price_unit string Required in parentoutput_cost.Allowed:
"token", "image", "second", "minute", "hour", "character"Example:
"token"OpenAPI response schema
{
"$ref": "#/components/schemas/OpenAIModelList"
}Example
{
"object": "list",
"data": [
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1721260800,
"owned_by": "openai",
"context_length": 128000,
"pricing": {
"input_cost": 0.15,
"output_cost": 0.6,
"input_price_unit": "token",
"output_price_unit": "token"
}
}
]
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "List models",
"operationId": "listModels",
"tags": [
"Models"
],
"description": "Returns the models available through the Respan gateway, in the OpenAI model list format.\n\nWithout an API key, the response lists every public model. With an API key, it lists the models your project can use.",
"responses": {
"200": {
"description": "The model list.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenAIModelList"
},
"example": {
"object": "list",
"data": [
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1721260800,
"owned_by": "openai",
"context_length": 128000,
"pricing": {
"input_cost": 0.15,
"output_cost": 0.6,
"input_price_unit": "token",
"output_price_unit": "token"
}
}
]
}
}
}
}
},
"security": [
{},
{
"RespanApiKey": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"schemas": {
"OpenAIModel": {
"type": "object",
"required": [
"id",
"object",
"created",
"owned_by",
"context_length",
"pricing"
],
"properties": {
"id": {
"type": "string",
"description": "Model ID. Send it as `model` in gateway requests.",
"example": "gpt-4o-mini"
},
"object": {
"type": "string",
"enum": [
"model"
],
"example": "model"
},
"created": {
"type": "integer",
"description": "Release date as a Unix timestamp, or `0` if unknown.",
"example": 1721260800
},
"owned_by": {
"type": "string",
"description": "The organization that develops the model.",
"example": "openai"
},
"context_length": {
"type": "integer",
"nullable": true,
"description": "Context window in tokens, or `null` if unknown.",
"example": 128000
},
"pricing": {
"$ref": "#/components/schemas/OpenAIModelPricing"
}
}
},
"OpenAIModelList": {
"type": "object",
"required": [
"object",
"data"
],
"properties": {
"object": {
"type": "string",
"enum": [
"list"
],
"example": "list"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OpenAIModel"
}
}
}
},
"OpenAIModelPricing": {
"type": "object",
"description": "Prices in USD.",
"required": [
"input_cost",
"output_cost",
"input_price_unit",
"output_price_unit"
],
"properties": {
"input_cost": {
"type": "number",
"nullable": true,
"description": "Input price per `input_price_unit`, after the Respan discount and the time-of-day schedule in effect now. Token and character prices are per 1M.",
"example": 0.15
},
"output_cost": {
"type": "number",
"nullable": true,
"description": "Output price per `output_price_unit`, after the Respan discount and the time-of-day schedule in effect now. Token and character prices are per 1M.",
"example": 0.6
},
"input_price_unit": {
"type": "string",
"enum": [
"token",
"image",
"second",
"minute",
"hour",
"character"
],
"description": "Unit for `input_cost`.",
"example": "token"
},
"output_price_unit": {
"type": "string",
"enum": [
"token",
"image",
"second",
"minute",
"hour",
"character"
],
"description": "Unit for `output_cost`.",
"example": "token"
}
}
}
},
"securitySchemes": {
"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"
}
}
}
}