> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laozhang.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Models API: list available model IDs

> List the model IDs your LaoZhang API key can use with GET /v1/models, read the response with cURL or Python, and find prices in the model catalog.

Send `GET https://api.laozhang.ai/v1/models` with your API key to list the models that key can see.

| Item | Details |
| - | - |
| Response format | OpenAI list format |
| Model ID | The `id` of each entry in `data[]`; pass it as `model` in a request |
| Not included | Prices, token groups, and supported endpoints; check them in the [model catalog](/en/models) |

## List models

Create an API key in [Token management](https://api.laozhang.ai/token) and export it in your terminal:

```bash theme={null}
export LAOZHANG_API_KEY="YOUR_LAOZHANG_API_KEY"
```

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl --fail-with-body --max-time 60 \
      "https://api.laozhang.ai/v1/models" \
      -H "Authorization: Bearer $LAOZHANG_API_KEY"
    ```
  </Tab>

  <Tab title="Python">
    Install the SDK with `python -m pip install openai`.

    ```python theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["LAOZHANG_API_KEY"],
        base_url="https://api.laozhang.ai/v1",
        timeout=60.0,
    )
    model_ids = sorted(model.id for model in client.models.list())
    print(f"{len(model_ids)} models")
    print("gpt-5.4-mini available:", "gpt-5.4-mini" in model_ids)
    ```
  </Tab>
</Tabs>

The Python example prints how many models the key can see and whether `gpt-5.4-mini` is among them. Replace that ID to check the model you plan to call.

## Read the response

The response is a list object. This example is shortened to one entry:

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5.4-mini",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai"
    }
  ]
}
```

| Field | Meaning |
| - | - |
| `data[].id` | Model ID to send in the `model` field of a request. |
| `data[].object` | Object type, `model`. |
| `data[].created` | Timestamp on the model record. |
| `data[].owned_by` | Owner or routing label for the model. |

The `created` and `owned_by` values above are examples; their contents depend on how each model is configured, so identify models by `id` only. Ignore fields your client does not recognize.

## Common questions

### Does the Models API return prices?

No. The response lists model IDs and basic metadata, not prices or billing units. Find input, output, and per-call prices in the [model catalog](/en/models), and the charge for each request in [call logs](/en/faq/call-logs).

### Why is a model from the catalog missing from the list?

The list reflects the key you used. The usual causes are the key's token group, account permissions, or a change in the model's status. Compare the key's group in [Token management](https://api.laozhang.ai/token) with the model's token groups in the catalog.

If they match and the model is still missing, contact support with the time, model ID, and token group; never send the key itself.

### Why does a listed model return 403 or 404?

Check the endpoint first. A listed model may accept only one format, such as Chat Completions, Responses, Anthropic Messages, or Gemini, which the catalog shows under **Endpoints**. If the endpoint is right, confirm the exact model ID and your token group, then follow [model availability and permissions](/en/faq/model-availability).

## Related documentation

* [Model catalog and pricing](/en/models)
* [OpenAI protocol: Chat Completions](/en/api-reference/chat-completions)
* [Model availability and permissions](/en/faq/model-availability)
* [Official OpenAI Models API reference](https://developers.openai.com/api/reference/resources/models/methods/list)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.