Skip to main content

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 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:
curl https://api.cometapi.com/api/models
The response contains model records:
{
  "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:
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:
your-model-id
another-model-id

Use a model ID

The following example sends a request with one model ID from the catalog:
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:
{
  "model": "your-model-id",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello."
      }
    }
  ]
}

Common errors

ErrorFix
Treating the catalog as pricing dataUse the model directory for pricing and capability details.
Reusing stale model IDsFetch the catalog during deployment or startup.
Confusing /api/models and /v1/modelsUse /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 typeMatch the model capability to the API reference page.
Last updated: May 27, 2026