List available OpenAI models
openai_list_modelsList model IDs your OpenAI API key can access, with optional substring filter, pagination, and defaults. Use it to find the right model before calls or debug 'model not found' errors.
Instructions
List the model IDs the configured API key has access to, optionally filtered by substring.
Call this before guessing a model ID — OpenAI adds, renames and retires models regularly, and access differs per project. The response also reports the model IDs this server uses by default for each capability.
Args:
filter (string): case-insensitive substring match on the model ID, e.g. "embedding"
limit (number): 1-200 (default 50)
offset (number): pagination offset (default 0)
response_format ('markdown'|'json'): default 'markdown'
Returns (JSON format): { "total": number, // number of models matching the filter "count": number, // models in this response "offset": number, // current pagination offset "models": [ { "id": string, "owned_by": string, "created_at": string } // created_at is ISO 8601 UTC ], "has_more": boolean, "next_offset": number, // present only when has_more is true "defaults": { "text": string, "image": string, "embedding": string, "transcription": string, "speech": string, "moderation": string } }
Examples:
Use when: "Which embedding models can I use?" -> filter="embedding"
Use when: a generation failed with "model not found" -> call without filter and inspect the list
Don't use when: you only need the server's configured defaults for a single call — those are applied automatically
Error Handling:
"Error: Authentication failed" means OPENAI_API_KEY is invalid
An empty list with a filter set means no model ID contains that substring
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of models to return | |
| filter | No | Case-insensitive substring the model ID must contain, e.g. "embedding" or "image" | |
| offset | No | Number of matching models to skip, for pagination | |
| response_format | No | Output format: 'markdown' or 'json' | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| total | Yes | ||
| models | Yes | ||
| offset | Yes | ||
| defaults | Yes | ||
| has_more | Yes | ||
| next_offset | No |