Models API
Distinguish API-key-protected protocol model lists from the public catalog, and query model IDs, capabilities, and context limits.
The model catalog is a reliable source of model identifiers for clients: the list is generated from enablement state and available channels, so clients should not hard-code model names.
GET /v1/models returns an OpenAI, Anthropic, or Gemini protocol model list. All three protocols require a valid APIQIK API key. The model-square catalog uses the separate GET /v1/public/models endpoint, requires neither login nor an API key, and returns the platform envelope (success + data.models).
Routing and response shape
GET /v1/models selects the protocol in this order, then returns the corresponding list after authentication succeeds:
- A non-empty
anthropic-versionheader or the presence of anx-api-keyheader selects Anthropic format. - Otherwise, the presence of a
keyquery parameter or anx-goog-api-keyheader selects Gemini format. - All other requests select OpenAI format and authenticate with
Authorization: Bearer <API_KEY>.
GET /v1beta/models always returns Gemini format and also requires a valid API key.
Protocol lists and the public catalog are separate: credentials do not make
/v1/modelsreturn the model-square platform envelope. Missing or invalid API keys return401. Avoid mixing authentication headers from different protocols to prevent selecting an unintended format.
OpenAI-compatible endpoint
GET /v1/models
curl "${BASE_URL}/v1/models" \
-H "Authorization: Bearer ${APIQIK_API_KEY}"Response
{
"object": "list",
"data": [
{
"id": "<model-id>",
"object": "model",
"created": 1626777600,
"owned_by": "<vendor-slug>"
}
]
}| Field | Description |
|---|---|
object | Always list. |
data[].id | Exact identifier for the request's model field. |
data[].object | Always model. |
data[].created | Fixed timestamp 1626777600, aligned with the upstream service; it does not change across deployments. |
data[].owned_by | Vendor slug of the model owner; custom when no vendor matches. |
The list is every enabled model that has an available channel. It accepts no pagination or filter parameters. To filter by capability, tag, or vendor, or to read context limits, use the platform catalog below.
Anthropic-compatible endpoint
Still GET /v1/models; a non-empty anthropic-version header or the presence of an x-api-key header selects Anthropic format. Authentication uses x-api-key first and falls back to Bearer only when that header is absent.
curl "${BASE_URL}/v1/models" \
-H "x-api-key: ${APIQIK_API_KEY}" \
-H "anthropic-version: 2023-06-01"created_at belongs to each model object. The list is not paginated: has_more is false, and an empty list has null for both first_id and last_id.
{
"data": [
{
"type": "model",
"id": "<model-id>",
"display_name": "<model-id>",
"created_at": "2021-07-20T10:40:00Z"
}
],
"first_id": "<model-id>",
"has_more": false,
"last_id": "<model-id>"
}Gemini-compatible endpoint
GET /v1beta/models
Authentication checks the key query parameter, then the x-goog-api-key header, then Bearer. A source is considered only when the preceding source is absent; an empty or malformed credential does not fall back to another source.
curl "${BASE_URL}/v1beta/models" \
-H "x-goog-api-key: ${APIQIK_API_KEY}"You can also call GET /v1/models with key or x-goog-api-key to select Gemini format. A /v1/models request with only Bearer authentication returns OpenAI format. The Gemini response is:
{
"models": [
{
"name": "models/<model-id>",
"displayName": "<model-id>",
"supportedGenerationMethods": ["generateContent", "streamGenerateContent"]
}
]
}name always carries the models/ prefix; Google SDKs rely on that prefix to resolve model identifiers.
Platform model catalog (model square)
GET /v1/public/models
The public business model catalog requires neither login nor an API key and returns the platform envelope. Use it to render model-square pages and filter UIs, not as the OpenAI SDK model-list endpoint.
curl "${BASE_URL}/v1/public/models?availableOnly=true&page=1&pageSize=20"Query parameters
| Parameter | Description |
|---|---|
availableOnly | Return only currently callable models. Production should keep this on. |
page, pageSize | Pagination. The catalog can be large, so pageSize=100 may produce a big response; page as needed. |
capability, capabilities | Filter by capability; currently chat, image, video. |
vendors, tags, billingModes | Plural filter fields; the server merges and de-duplicates them and ORs values within a dimension. |
contextRanges | Context buckets: SHORT, MEDIUM, LONG, EXTRA_LONG. |
sort | Sort order: DEFAULT, LATEST, RECOMMENDED; empty means DEFAULT. |
lang | Language for tag statistics: zh returns Chinese labels; any other value or omission returns English labels. |
Response
{
"success": true,
"data": {
"total": 70,
"page": 1,
"pageSize": 20,
"models": [
{
"id": "11",
"name": "<model-id>",
"vendorName": "<vendor>",
"capabilities": ["chat"],
"tags": ["text generation", "complex reasoning", "tool calling", "code generation"],
"contextWindow": 200000,
"maxOutputTokens": 128000,
"isAvailable": true
}
],
"filterStats": {
"capabilities": [
{ "value": "chat", "count": "46" },
{ "value": "image", "count": "8" },
{ "value": "video", "count": "16" }
]
}
}
}| Field | Description |
|---|---|
data.models[].name | Exact identifier for the request's model field. |
data.models[].capabilities | Capability category; currently chat, image, video. |
data.models[].tags | Finer-grained tags such as "vision", "complex reasoning", or "text-to-image". |
data.models[].contextWindow, maxOutputTokens | Context ceiling and per-request output ceiling. |
data.models[].isAvailable | Whether the model is currently callable. |
data.filterStats | Aggregate counts over all available models by vendor, capability, tag, and billing mode, so filters can render without fetching the full catalog. |
id is an internal stable catalog number; name is the model identifier. Do not mix them up.
Client strategy
- Third-party SDKs use the corresponding protocol model-list endpoint with a valid APIQIK API key: Bearer for OpenAI,
x-api-keyfor Anthropic, and/v1beta/modelsfor Gemini SDKs. - Protocol lists contain all available models and are not filtered by the key's model scope. A listed model does not establish that the key has permission to invoke it.
- The catalog can be cached briefly, but every request must handle "model missing or temporarily unavailable".
- Use
capabilitiesandtagsfor capability filtering; do not infer vision, video, or tool-call support from the model name. - When pinning model identifiers in production, do not fall back automatically to a model with different semantics; any fallback needs an explicit allowlist.
- Prices, rate limits, and channel priority are not part of this endpoint; use the console model details and billing documentation.