List models in OpenAI format

http
GET /ai/v1/models

List models in OpenAI format.

Servers

JSON
[  {    "url": "https://api.veryfront.com"  }]

Authentication

JSON
[  {    "bearerAuth": []  },  {    "apiKeyAuth": []  }]
JSON
{  "bearerAuth": {    "type": "http",    "scheme": "bearer",    "bearerFormat": "JWT or API Key",    "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."  },  "apiKeyAuth": {    "type": "apiKey",    "in": "header",    "name": "X-API-Key",    "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."  }}

Parameters

NameLocationRequiredDescription
limitqueryNo
after_idqueryNo
before_idqueryNo
x-veryfront-project-referenceheaderNo
x-veryfront-project-idheaderNo
x-veryfront-project-slugheaderNo
anthropic-versionheaderNo

Parameter contracts

JSON
[  {    "schema": {      "type": "integer",      "exclusiveMinimum": 0,      "maximum": 1000,      "description": "Maximum number of models to return.",      "example": 1000    },    "required": false,    "name": "limit",    "in": "query"  },  {    "schema": {      "type": "string",      "description": "Anthropic format only (`anthropic-version` sent): return the models that follow this model id."    },    "required": false,    "name": "after_id",    "in": "query"  },  {    "schema": {      "type": "string",      "description": "Anthropic format only (`anthropic-version` sent): return the models that precede this model id."    },    "required": false,    "name": "before_id",    "in": "query"  },  {    "schema": {      "type": "string",      "minLength": 1,      "maxLength": 255,      "description": "Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."    },    "required": false,    "name": "x-veryfront-project-reference",    "in": "header"  },  {    "schema": {      "type": "string",      "minLength": 1,      "maxLength": 255,      "description": "Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."    },    "required": false,    "name": "x-veryfront-project-id",    "in": "header"  },  {    "schema": {      "type": "string",      "minLength": 1,      "maxLength": 255,      "description": "Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."    },    "required": false,    "name": "x-veryfront-project-slug",    "in": "header"  },  {    "schema": {      "type": "string",      "description": "Present on an Anthropic client's request, as Anthropic SDKs and Claude Code send it. Selects Anthropic's list format and error envelope, and the Anthropic cursors `after_id` and `before_id`. Without it the list uses OpenAI's format.",      "example": "2023-06-01"    },    "required": false,    "name": "anthropic-version",    "in": "header"  }]

Responses

200

Model list from the Veryfront catalog, never forwarded to a vendor. OpenAI's list shape by default; Anthropic's list shape, error envelope and after_id / before_id cursors when the request carries anthropic-version.

JSON
{  "description": "Model list from the Veryfront catalog, never forwarded to a vendor. OpenAI's list shape by default; Anthropic's list shape, error envelope and `after_id` / `before_id` cursors when the request carries `anthropic-version`.",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiModelList"          },          {            "$ref": "#/components/schemas/NeutralAnthropicModelList"          }        ]      }    }  }}

400

No project selector, or a selector that names no usable project

JSON
{  "description": "No project selector, or a selector that names no usable project",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiError"          },          {            "$ref": "#/components/schemas/NeutralAnthropicError"          }        ]      }    }  }}

401

Unauthorized

JSON
{  "description": "Unauthorized",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiError"          },          {            "$ref": "#/components/schemas/NeutralAnthropicError"          }        ]      }    }  }}

403

Project access denied, or a credential restricted to template inference

JSON
{  "description": "Project access denied, or a credential restricted to template inference",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiError"          },          {            "$ref": "#/components/schemas/NeutralAnthropicError"          }        ]      }    }  }}

500

Gateway error

JSON
{  "description": "Gateway error",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiError"          },          {            "$ref": "#/components/schemas/NeutralAnthropicError"          }        ]      }    }  }}

503

Authentication or the project inference policy is temporarily unavailable

JSON
{  "description": "Authentication or the project inference policy is temporarily unavailable",  "content": {    "application/json": {      "schema": {        "anyOf": [          {            "$ref": "#/components/schemas/NeutralOpenAiError"          },          {            "$ref": "#/components/schemas/NeutralAnthropicError"          }        ]      }    }  }}

Referenced contracts

components/schemas/NeutralOpenAiModelList

JSON
{  "type": "object",  "properties": {    "object": {      "type": "string",      "enum": [        "list"      ]    },    "data": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string"          },          "object": {            "type": "string",            "enum": [              "model"            ]          },          "created": {            "type": "number"          },          "owned_by": {            "type": "string"          },          "veryfront": {            "$ref": "#/components/schemas/VeryfrontListedModelProcessing"          }        },        "required": [          "id",          "object",          "created",          "owned_by",          "veryfront"        ]      }    }  },  "required": [    "object",    "data"  ]}

components/schemas/VeryfrontListedModelProcessing

JSON
{  "type": "object",  "properties": {    "processing": {      "type": "string",      "description": "Where inference is processed: `eu`, `us`, `worldwide` or `unknown` (not recorded). An open string.",      "example": "eu"    },    "processing_label": {      "type": "string",      "description": "The processing location in words, for display, e.g. `EU (EEA + Switzerland data zone)`.",      "example": "EU (EEA + Switzerland data zone)"    },    "model_provider": {      "type": "object",      "properties": {        "id": {          "type": "string",          "description": "Stable identifier."        },        "name": {          "type": "string",          "description": "Display name."        }      },      "required": [        "id",        "name"      ],      "description": "Who made the model.",      "example": {        "id": "mistral",        "name": "Mistral"      }    },    "inference_providers": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string",            "description": "Stable identifier."          },          "name": {            "type": "string",            "description": "Display name."          },          "region": {            "type": "string",            "description": "Where inference runs. Known values: `eu`, `us`, `worldwide`, `unknown`. Tolerate values you have not seen."          }        },        "required": [          "id",          "name",          "region"        ],        "description": "Who runs the model."      },      "description": "Who runs the model and where, one entry per deployment the caller may use, in routing order. `region` is `eu`, `us`, `worldwide` or `unknown`; an open string.",      "example": [        {          "id": "google-vertex",          "name": "Google",          "region": "eu"        }      ]    }  },  "required": [    "processing",    "processing_label",    "model_provider",    "inference_providers"  ]}

components/schemas/NeutralAnthropicModelList

JSON
{  "type": "object",  "properties": {    "data": {      "type": "array",      "items": {        "type": "object",        "properties": {          "type": {            "type": "string",            "enum": [              "model"            ]          },          "id": {            "type": "string"          },          "display_name": {            "type": "string"          },          "created_at": {            "type": "string"          },          "description": {            "type": "string"          },          "veryfront": {            "$ref": "#/components/schemas/VeryfrontListedModelProcessing"          }        },        "required": [          "type",          "id",          "display_name",          "created_at",          "veryfront"        ]      }    },    "has_more": {      "type": "boolean"    },    "first_id": {      "type": [        "string",        "null"      ]    },    "last_id": {      "type": [        "string",        "null"      ]    }  },  "required": [    "data",    "has_more",    "first_id",    "last_id"  ]}

components/schemas/NeutralOpenAiError

JSON
{  "type": "object",  "properties": {    "error": {      "type": "object",      "properties": {        "message": {          "type": "string"        },        "type": {          "type": "string"        },        "param": {          "type": [            "string",            "null"          ]        },        "code": {          "type": [            "string",            "null"          ]        },        "veryfront": {          "type": "object",          "additionalProperties": {}        }      },      "required": [        "message",        "type",        "param",        "code"      ]    }  },  "required": [    "error"  ]}

components/schemas/NeutralAnthropicError

JSON
{  "type": "object",  "properties": {    "type": {      "type": "string",      "enum": [        "error"      ]    },    "error": {      "type": "object",      "properties": {        "type": {          "type": "string"        },        "message": {          "type": "string"        },        "code": {          "type": "string"        },        "veryfront": {          "type": "object",          "additionalProperties": {}        }      },      "required": [        "type",        "message"      ]    }  },  "required": [    "type",    "error"  ]}

Operation contract

JSON
{  "operationId": "neutralOpenAiModelList",  "tags": [    "ai-gateway/Models/Inference Models"  ],  "summary": "List models in OpenAI format",  "description": "List models in OpenAI format.",  "parameters": [    {      "schema": {        "type": "integer",        "exclusiveMinimum": 0,        "maximum": 1000,        "description": "Maximum number of models to return.",        "example": 1000      },      "required": false,      "name": "limit",      "in": "query"    },    {      "schema": {        "type": "string",        "description": "Anthropic format only (`anthropic-version` sent): return the models that follow this model id."      },      "required": false,      "name": "after_id",      "in": "query"    },    {      "schema": {        "type": "string",        "description": "Anthropic format only (`anthropic-version` sent): return the models that precede this model id."      },      "required": false,      "name": "before_id",      "in": "query"    },    {      "schema": {        "type": "string",        "minLength": 1,        "maxLength": 255,        "description": "Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."      },      "required": false,      "name": "x-veryfront-project-reference",      "in": "header"    },    {      "schema": {        "type": "string",        "minLength": 1,        "maxLength": 255,        "description": "Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."      },      "required": false,      "name": "x-veryfront-project-id",      "in": "header"    },    {      "schema": {        "type": "string",        "minLength": 1,        "maxLength": 255,        "description": "Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."      },      "required": false,      "name": "x-veryfront-project-slug",      "in": "header"    },    {      "schema": {        "type": "string",        "description": "Present on an Anthropic client's request, as Anthropic SDKs and Claude Code send it. Selects Anthropic's list format and error envelope, and the Anthropic cursors `after_id` and `before_id`. Without it the list uses OpenAI's format.",        "example": "2023-06-01"      },      "required": false,      "name": "anthropic-version",      "in": "header"    }  ],  "responses": {    "200": {      "description": "Model list from the Veryfront catalog, never forwarded to a vendor. OpenAI's list shape by default; Anthropic's list shape, error envelope and `after_id` / `before_id` cursors when the request carries `anthropic-version`.",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiModelList"              },              {                "$ref": "#/components/schemas/NeutralAnthropicModelList"              }            ]          }        }      }    },    "400": {      "description": "No project selector, or a selector that names no usable project",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiError"              },              {                "$ref": "#/components/schemas/NeutralAnthropicError"              }            ]          }        }      }    },    "401": {      "description": "Unauthorized",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiError"              },              {                "$ref": "#/components/schemas/NeutralAnthropicError"              }            ]          }        }      }    },    "403": {      "description": "Project access denied, or a credential restricted to template inference",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiError"              },              {                "$ref": "#/components/schemas/NeutralAnthropicError"              }            ]          }        }      }    },    "500": {      "description": "Gateway error",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiError"              },              {                "$ref": "#/components/schemas/NeutralAnthropicError"              }            ]          }        }      }    },    "503": {      "description": "Authentication or the project inference policy is temporarily unavailable",      "content": {        "application/json": {          "schema": {            "anyOf": [              {                "$ref": "#/components/schemas/NeutralOpenAiError"              },              {                "$ref": "#/components/schemas/NeutralAnthropicError"              }            ]          }        }      }    }  },  "x-documentation-source-tag": "Inference Models",  "x-canonical-documentation": {    "domain": "ai-gateway",    "resource": "Models",    "subgroup": "Inference Models",    "name": "List models in OpenAI format",    "description": "List models in OpenAI format.",    "operationId": "neutralOpenAiModelList"  },  "x-mint": {    "href": "/cloud/rest/api-reference/ai-gateway-models-inference-models/list-models-in-openai-format"  }}