Skip to content

OpenAI format

GET
/v1/models
curl --request GET \
--url https://api.mirapi.ai/v1/models \
--header 'Authorization: Bearer <token>' \
--header 'anthropic-version: ' \
--header 'x-api-key: ' \
--header 'x-goog-api-key: '

Returns the list of models currently available.

The response format is detected automatically from the request headers:

  • x-api-key together with anthropic-version → Anthropic format
  • the x-goog-api-key header or the key query parameter → Gemini format
  • otherwise → OpenAI format
key
string

Google API key (for the Gemini format)

x-api-key
string

Anthropic API key (for the Claude format)

Example
anthropic-version
string

Anthropic API version

Example
x-goog-api-key
string

Google API key (for the Gemini format)

Example

Model list returned

Media typeapplication/json
object
object
string
data
Array<object>
object
id

Model ID

string
object

Object type

string
created

Creation timestamp

integer
owned_by

Model owner

string
Example
{
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"owned_by": "openai"
}
]
}

Authentication failed

Media typeapplication/json
object
error
object
message

Error message

string
type

Error type

string
param

Related parameter

string
nullable
code

Error code

string
nullable
Examplegenerated
{
"error": {
"message": "example",
"type": "example",
"param": "example",
"code": "example"
}
}