---
title: "Query Available Models API"
description: "Two response formats of GET /v1/models, reading model IDs, and the difference between model visibility and actual callability."
headingIds: {"OpenAI Format":"section-1","Anthropic Format":"section-2","How to Use Query Results":"section-3","Empty List or Missing Models":"section-4"}
---

<aside className="docs-publication" data-pagefind-ignore>

Documentation maintained by [1ZheAI](https://1zheai.com/en/editorial/#publisher). [Sources and corrections](https://1zheai.com/en/editorial/).

Found an error? [Contact support](mailto:support@1zheai.com) with the page address and a description. Do not send API keys or account credentials.

</aside>
Query models first, then write requests. `GET https://1zheai.com/v1/models` returns the models visible under the current key, group, and model limits, without needing to send an inference request.

## OpenAI Format

```bash
curl --fail-with-body --connect-timeout 10 --max-time 30 \
  https://1zheai.com/v1/models \
  -H "Authorization: Bearer $ONEZHE_API_KEY"
```

Below is a simplified structural illustration; the actual list is based on the real response:

```json
{
  "object": "list",
  "data": [{"id": "gpt-5.6-sol", "object": "model"}]
}
```

When `jq` is installed, you can append `| jq -r '.data[].id'` after the request, displaying one model ID per line. Do not confuse the `model_name` of the public pricing endpoint with the `id` here.

## Anthropic Format

When using the following two request headers, the same path returns Anthropic-style data:

```bash
curl --fail-with-body https://1zheai.com/v1/models \
  -H "x-api-key: $ONEZHE_API_KEY" \
  -H "anthropic-version: 2023-06-01"
```

Pay attention to `data[].id`, `data[].display_name`, and `has_more`. After switching authentication methods, do not continue parsing with the other response structure.

## How to Use Query Results

1. Copy the complete ID from `data[].id`, preserving case, hyphens, and date suffixes.
2. Verify the interface type of that model in the [console model catalog ](https://1zheai.com/model-catalog?lng=en).
3. Validate with a minimal text request, then gradually add images, tools, or other parameters.

The model list is not a real-time health check and does not include all parameter limits. Even if a model is visible, requests may still fail when no upstream is temporarily available; the official website's HTTP availability monitoring also does not mean every model can successfully infer.

## Empty List or Missing Models

Check the key's model limits and group; models shown on the public pricing page are not necessarily open to every key. For 401, first check the key status; for 403, check access conditions; see [error codes and troubleshooting ](/en/docs/troubleshooting/) for detailed steps.

For model series and selection recommendations, see [supported models ](/en/docs/models/).
