API REFERENCE
List Models
On this page
/api/ai/modelsReturns the catalog of language models available through the Vercel AI Gateway. Embedding models are filtered out. The full schema mirrors the Vercel AI Gateway response (GatewayLanguageModelEntry from @ai-sdk/gateway); the documented properties below are the load-bearing fields used by clients. No authentication required.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request GET \
--url 'https://recoup-api.vercel.app/api/ai/models' \
--header 'x-api-key: YOUR_API_KEY'Responses
200Model catalog retrieved successfully+
application/json
modelsarray<GatewayLanguageModelEntry>requiredList of language models available through the Vercel AI Gateway
Item properties for models
idstringFully qualified model identifier (e.g., 'anthropic/claude-3-5-sonnet')
namestringHuman-readable display name for the model
descriptionstringProvider-supplied description of the model
modelTypestringType of model - embedding models are filtered out before the response is returned
pricingobjectPer-token pricing information as reported by the gateway
Properties for pricing
inputstringCost per input token (USD)
outputstringCost per output token (USD)
Additional properties
Additional keys are allowed.
specificationobjectModel specification metadata (provider, version, capabilities). Shape mirrors the gateway response.
context_windowintegerMaximum number of tokens the model can process in a single request (input + output combined). Clients use this to gate model selection against per-request token budgets.
costobjectPer-million-token pricing in USD. Derived from pricing (which is per-token) for client-side display.
Properties for cost
inputnumberrequiredUSD cost per million input tokens.
outputnumberrequiredUSD cost per million output tokens.
Additional properties
Additional keys are allowed.
500Internal server error - failed to fetch models from the gateway+
application/json
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download ai.jsonView operation source
{
"description": "Returns the catalog of language models available through the Vercel AI Gateway. Embedding models are filtered out. The full schema mirrors the Vercel AI Gateway response (`GatewayLanguageModelEntry` from `@ai-sdk/gateway`); the documented properties below are the load-bearing fields used by clients. No authentication required.",
"responses": {
"200": {
"description": "Model catalog retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AIModelsResponse"
}
}
}
},
"500": {
"description": "Internal server error - failed to fetch models from the gateway",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AIModelsErrorResponse"
}
}
}
}
}
}