List models
get/v1/models
List the currently available models.
The response format is detected from the request headers:
x-api-keytogether withanthropic-versionreturns the Anthropic formatx-goog-api-keyor akeyquery parameter returns the Gemini format- anything else returns the OpenAI format
Authentication
Send your OLETOKEN API key as a Bearer token. Keys are created on the API Keys page of the console.
Authorization: Bearer $OLETOKEN_API_KEYParameters
| Field | Type | Required | Description |
|---|---|---|---|
| keyquery | string | — | Google API key (for the Gemini format) |
| x-api-keyheader | string | — | Anthropic API key (for the Claude format) |
| anthropic-versionheader | string | — | Anthropic API version |
| x-goog-api-keyheader | string | — | Google API key (for the Gemini format) |
Responses
200Models retrieved
| Field | Type | Required | Description |
|---|---|---|---|
| object | string | — | — |
| data | Model[] | — | — |
| id | string | — | Model ID |
| object | string | — | Object type |
| created | integer | — | Creation timestamp |
| owned_by | string | — | Model owner |
401Authentication failed
| Field | Type | Required | Description |
|---|---|---|---|
| error | object | — | — |
| message | string | — | Error message |
| type | string | — | Error type |
| param | string | null | — | The parameter involved |
| code | string | null | — | Error code |
Example request
curl -X GET 'https://api.oletoken.ai/v1/models?key=string' \
-H "Authorization: Bearer $OLETOKEN_API_KEY" \
-H 'x-api-key:' \
-H 'anthropic-version:' \
-H 'x-goog-api-key:'
