/api/v1/models
endpoint provides a list of available text generation models. It supports optional detailed information including pricing data. The endpoint maintains full backwards compatibility while adding powerful new features.
For embedding models, use the dedicated /api/v1/embedding-models endpoint which provides comprehensive information about all available embedding models.
Parameter | Type | Default | Description |
---|---|---|---|
detailed | boolean | false | Returns detailed model information including pricing |
Header | Format | Required | Description |
---|---|---|---|
Authorization | Bearer {api_key} | Optional | API key for user-specific pricing |
x-api-key | {api_key} | Optional | Alternative API key header |
Field | Type | Description |
---|---|---|
id | string | Unique model identifier |
object | string | Always “model” for OpenAI compatibility |
created | number | Unix timestamp of response creation |
owned_by | string | Model provider (openai, anthropic, meta, google, etc.) |
Field | Type | Description |
---|---|---|
name | string | Human-readable model name |
description | string | Detailed model description |
context_length | number | Maximum input tokens (null if not available) |
pricing | object | Pricing information object |
Field | Type | Description |
---|---|---|
prompt | number | Cost per million input tokens in USD |
completion | number | Cost per million output tokens in USD |
currency | string | Always “USD” |
unit | string | Always “per_million_tokens” |
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Returns detailed model information including pricing
List of available models
The response is of type object
.