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

# Gebruik CometAPI-documentatie met LLM's

> Gebruik CometAPI llms.txt en llms-full.txt met coding assistants, retrieval-systemen en model prompts.

Gebruik `llms.txt` wanneer je een compacte index van CometAPI-documentatiepagina's nodig hebt. Gebruik `llms-full.txt` wanneer je tool de volledige documentatietekst kan opnemen voor retrieval, vraagbeantwoording of codeerhulp.

## Haal de compacte index op

De volgende aanvraag downloadt de CometAPI `llms.txt`-index:

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

De response begint met de documentatietitel en de lijst met gelinkte pagina's:

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

## Haal de volledige tekst op

De volgende aanvraag downloadt de export met de volledige tekst:

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

De response bevat pagina-inhoud gegroepeerd op bron-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.
```

## Voeg documentatie toe aan een retrieval-taak

Het volgende Python-voorbeeld downloadt de volledige tekst en schrijft die naar een lokaal bestand voor indexering:

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

Het resultaat is het aantal opgeslagen tekens. Dit is alleen voorbeeldoutput; jouw waarde zal verschillen wanneer de documentatie verandert:

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

## Veelvoorkomende fouten

| Error                      | Fix                                                                                       |
| -------------------------- | ----------------------------------------------------------------------------------------- |
| Tool context is too small  | Gebruik eerst `llms.txt` en haal daarna alleen de gelinkte pagina's op die relevant zijn. |
| Full text is too large     | Deel `llms-full.txt` op per heading of bron-URL vóór indexering.                          |
| Broken local cache         | Vernieuw het bestand tijdens je synchronisatietaak voor documentatie.                     |
| Missing page in AI results | Controleer of de pagina in de navigatie en in `llms.txt` voorkomt.                        |

## Gerelateerde links

* [CometAPI docs home](/)
* [Models page](/nl/overview/models)
* [Model directory](https://www.cometapi.com/models/)
* [Pricing](https://www.cometapi.com/pricing/)
* [CometAPI quickstart](/nl/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": "Hoe gebruik ik CometAPI-documentatie met LLM's?",
        "description": "Gebruik CometAPI llms.txt en llms-full.txt met coding assistants, retrieval-systemen en model prompts.",
        "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-documentatie",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Handleidingen",
            "item": "https://apidoc.cometapi.com/guides/use-cometapi-with-openai-sdk"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "Hoe gebruik ik CometAPI-documentatie met LLM's?",
            "item": "https://apidoc.cometapi.com/guides/how-to-use-cometapi-docs-with-llms"
          }
        ]
      }
    ]
    }
    `}
</script>
