> ## 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.

# 사용 가능한 CometAPI 모델 나열

> 모델 카탈로그 엔드포인트로 사용 가능한 CometAPI 모델을 나열하고, 모델 디렉터리에서 기능과 가격을 확인합니다.

공개 `GET /api/models` 카탈로그 엔드포인트를 호출해 사용 가능한 모델을 나열합니다. 반환된 model ID를 API 요청에 사용한 다음, 모델 디렉터리에서 기능과 가격 세부 정보를 확인하세요.

## 모델 카탈로그 호출

다음 요청은 사용 가능한 모델을 나열합니다:

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

응답에는 모델 레코드가 포함됩니다:

```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 모델 목록

다음 Python 예제는 카탈로그에서 model ID를 출력합니다:

```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"])
```

출력은 model ID 목록입니다:

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

## model ID 사용

다음 예제는 카탈로그의 model ID 하나를 사용해 요청을 전송합니다:

```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."
      }
    ]
  }'
```

응답은 선택한 model ID를 사용합니다:

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

## 일반적인 오류

| 오류                               | 해결 방법                                                                               |
| -------------------------------- | ----------------------------------------------------------------------------------- |
| 카탈로그를 가격 데이터로 취급함                | 가격 및 기능 세부 정보는 모델 디렉터리를 사용하세요.                                                      |
| 오래된 model ID를 재사용함               | 배포 또는 시작 시 카탈로그를 가져오세요.                                                             |
| `/api/models`와 `/v1/models`를 혼동함 | 공개 카탈로그에는 `/api/models`를 사용하세요. OpenAI 호환 모델 목록 형태가 필요할 때만 인증된 `/v1/models`를 사용하세요. |
| 모델 유형에 맞지 않는 엔드포인트 사용            | 모델 기능에 맞는 API 레퍼런스 페이지를 사용하세요.                                                      |

## 관련 링크

* [모델 페이지](/ko/overview/models)
* [모델 디렉터리](https://www.cometapi.com/models/)
* [요금](https://www.cometapi.com/pricing/)
* [텍스트 모델](/api/text)
* [이미지 모델](/api/image)
* [비디오 모델](/api/video)
* [오디오 모델](/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": "사용 가능한 모델을 어떻게 나열하나요?",
        "description": "공개 모델 카탈로그 엔드포인트로 사용 가능한 CometAPI 모델을 나열하고, 모델 디렉터리를 사용해 기능과 가격을 확인하세요.",
        "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 문서",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "가이드",
            "item": "https://apidoc.cometapi.com/guides/use-cometapi-with-openai-sdk"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "사용 가능한 모델을 어떻게 나열하나요?",
            "item": "https://apidoc.cometapi.com/guides/how-to-list-available-models"
          }
        ]
      }
    ]
    }
    `}
</script>
