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

# List available CometAPI models

> List available CometAPI models with the model catalog endpoint and use the model directory to confirm capabilities and pricing.

List available models by calling the public `GET /api/models` catalog endpoint. Use the returned model IDs for API requests, then confirm capability and pricing details in the model directory.

## Call the model catalog

The following request lists available models:

```bash theme={null}
curl https://api.cometapi.com/api/models
```

The response contains model records:

```json theme={null}
{
  "success": true,
  "page": 0,
  "page_size": 0,
  "total": 301,
  "data": [
    {
      "id": "gpt-image-2",
      "provider": "OpenAI",
      "model_type": "image",
      "features": [
        "text-to-image"
      ],
      "pricing": {
        "currency": "USD / M Tokens",
        "input": 4,
        "output": 24,
        "per_request": null,
        "per_second": null
      },
      "api_doc_url": "https://apidoc.cometapi.com/api/image/openai/images"
    }
  ]
}
```

## Python model list

The following Python example prints model IDs from the catalog:

```python theme={null}
import requests

response = requests.get("https://api.cometapi.com/api/models", timeout=30)
response.raise_for_status()

models = response.json()["data"]
for model in models:
    print(model["id"])
```

The output is a list of model IDs:

```text theme={null}
your-model-id
another-model-id
```

## Use a model ID

The following example sends a request with one model ID from the catalog:

```bash theme={null}
curl https://api.cometapi.com/v1/chat/completions \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      {
        "role": "user",
        "content": "Say hello."
      }
    ]
  }'
```

The response uses the selected model ID:

```json theme={null}
{
  "model": "your-model-id",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello."
      }
    }
  ]
}
```

## Common errors

| Error                                    | Fix                                                                                                                                 |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Treating the catalog as pricing data     | Use the model directory for pricing and capability details.                                                                         |
| Reusing stale model IDs                  | Fetch the catalog during deployment or startup.                                                                                     |
| Confusing `/api/models` and `/v1/models` | Use `/api/models` for the public catalog. Use authenticated `/v1/models` only when you need the OpenAI-compatible model-list shape. |
| Wrong endpoint for the model type        | Match the model capability to the API reference page.                                                                               |

## Related links

* [Models page](/overview/models)
* [Model directory](https://www.cometapi.com/models/)
* [Pricing](https://www.cometapi.com/pricing/)
* [Text Models](/api/text)
* [Image Models](/api/image)
* [Video Models](/api/video)
* [Audio Models](/api/audio)

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "TechArticle",
        "@id": "https://apidoc.cometapi.com/guides/how-to-list-available-models",
        "headline": "How do I list available models?",
        "description": "List available CometAPI models with the public model catalog endpoint and use the model directory to confirm capabilities and pricing.",
        "url": "https://apidoc.cometapi.com/guides/how-to-list-available-models",
        "author": {
          "@type": "Organization",
          "name": "CometAPI"
        },
        "publisher": {
          "@type": "Organization",
          "name": "CometAPI",
          "url": "https://www.cometapi.com"
        }
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "CometAPI Docs",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Guides",
            "item": "https://apidoc.cometapi.com/guides/use-cometapi-with-openai-sdk"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "How do I list available models?",
            "item": "https://apidoc.cometapi.com/guides/how-to-list-available-models"
          }
        ]
      }
    ]
    }
    `}
</script>
