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

# LLM과 함께 CometAPI 문서 사용하기

> 코딩 어시스턴트, 검색 시스템, 모델 프롬프트와 함께 CometAPI llms.txt 및 llms-full.txt를 사용하세요.

CometAPI 문서 페이지의 간결한 인덱스가 필요할 때는 `llms.txt`를 사용하세요. 검색, 질의응답 또는 코딩 지원을 위해 도구가 전체 문서 텍스트를 수집할 수 있다면 `llms-full.txt`를 사용하세요.

## 간결한 인덱스 가져오기

다음 요청은 CometAPI `llms.txt` 인덱스를 다운로드합니다:

```bash theme={null}
curl https://apidoc.cometapi.com/llms.txt
```

응답은 문서 제목과 링크된 페이지 목록으로 시작합니다:

```text theme={null}
# CometAPI Documentation

> CometAPI developer documentation for unified API access...

## Docs

- [Create a new API key](https://apidoc.cometapi.com/api/api-keys/create-api-key.md)
```

## 전체 텍스트 가져오기

다음 요청은 전체 텍스트 내보내기를 다운로드합니다:

```bash theme={null}
curl https://apidoc.cometapi.com/llms-full.txt
```

응답에는 소스 URL별로 그룹화된 페이지 콘텐츠가 포함됩니다:

```text theme={null}
# Create a new API key
Source: https://apidoc.cometapi.com/api/api-keys/create-api-key

Create a new CometAPI API key for the authenticated account.
```

## 문서를 검색 작업에 추가하기

다음 Python 예제는 전체 텍스트를 다운로드하고 인덱싱을 위해 로컬 파일에 씁니다:

```python theme={null}
from pathlib import Path

import requests

url = "https://apidoc.cometapi.com/llms-full.txt"
response = requests.get(url, timeout=60)
response.raise_for_status()

Path("cometapi-docs.txt").write_text(response.text, encoding="utf-8")
print(len(response.text))
```

결과는 저장된 문자 수입니다. 이는 예시 출력일 뿐이며, 문서가 변경될 때마다 값은 달라집니다:

```text theme={null}
449946
```

## 일반적인 오류

| 오류             | 해결 방법                                               |
| -------------- | --------------------------------------------------- |
| 도구 컨텍스트가 너무 작음 | 먼저 `llms.txt`를 사용한 다음, 관련 있는 링크된 페이지만 가져오세요.        |
| 전체 텍스트가 너무 큼   | 인덱싱 전에 제목 또는 소스 URL 기준으로 `llms-full.txt`를 청크로 나누세요. |
| 로컬 캐시 손상       | 문서 동기화 작업 중에 파일을 새로고침하세요.                           |
| AI 결과에 페이지가 없음 | 해당 페이지가 내비게이션과 `llms.txt`에 표시되는지 확인하세요.             |

## 관련 링크

* [CometAPI 문서 홈](/)
* [모델 페이지](/ko/overview/models)
* [모델 디렉터리](https://www.cometapi.com/models/)
* [요금](https://www.cometapi.com/pricing/)
* [CometAPI 빠른 시작](/ko/overview/quick-start)

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "TechArticle",
        "@id": "https://apidoc.cometapi.com/guides/how-to-use-cometapi-docs-with-llms",
        "headline": "LLM과 함께 CometAPI 문서를 어떻게 사용하나요?",
        "description": "코딩 어시스턴트, 검색 시스템, 모델 프롬프트와 함께 CometAPI llms.txt 및 llms-full.txt를 사용하세요.",
        "url": "https://apidoc.cometapi.com/guides/how-to-use-cometapi-docs-with-llms",
        "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": "LLM과 함께 CometAPI 문서를 어떻게 사용하나요?",
            "item": "https://apidoc.cometapi.com/guides/how-to-use-cometapi-docs-with-llms"
          }
        ]
      }
    ]
    }
    `}
</script>
