AI Model APIModelsList models
Native OpenAI format
Get the list of currently available models.
Automatically identify the response format based on request headers:
- Returns Anthropic format when
x-api-keyandanthropic-versionheaders are present - Returns Gemini format when
x-goog-api-keyheader orkeyquery parameter is present - Returns OpenAI format for all other cases
Authorization
BearerAuth
AuthorizationBearer <token>
Use Bearer Token authentication.
Format: Authorization: Bearer sk-xxxxxx
In: header
Query Parameters
key?string
Google API Key (for Gemini format)
Header Parameters
x-api-key?string
Anthropic API Key (for Claude format)
anthropic-version?string
Anthropic API version
x-goog-api-key?string
Google API Key (for Gemini format)
Response Body
application/json
application/json
curl -X GET "https://api.aiai.com/v1/models"{
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 0,
"owned_by": "openai"
}
]
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}