RecoupGet a Free AuditFree Audit

API REFERENCE

List Models

On this page
GET/api/ai/models

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.

Authentication

See the authentication guide for API key and account access requirements.

Request

cURL
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>required

List of language models available through the Vercel AI Gateway

Item properties for models
idstring

Fully qualified model identifier (e.g., 'anthropic/claude-3-5-sonnet')

namestring

Human-readable display name for the model

descriptionstring

Provider-supplied description of the model

modelTypestring

Type of model - embedding models are filtered out before the response is returned

pricingobject

Per-token pricing information as reported by the gateway

Properties for pricing
inputstring

Cost per input token (USD)

outputstring

Cost per output token (USD)

Additional properties

Additional keys are allowed.

specificationobject

Model specification metadata (provider, version, capabilities). Shape mirrors the gateway response.

context_windowinteger

Maximum 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.

costobject

Per-million-token pricing in USD. Derived from pricing (which is per-token) for client-side display.

Properties for cost
inputnumberrequired

USD cost per million input tokens.

outputnumberrequired

USD cost per million output tokens.

Additional properties

Additional keys are allowed.

500Internal server error - failed to fetch models from the gateway

application/json

messagestringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download ai.json
View operation source
json
{
  "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"
          }
        }
      }
    }
  }
}