> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Markdown & llms.txt

> Use Sarvam's llms.txt, llms-full.txt, and per-page Markdown to feed accurate, up-to-date documentation into any LLM — and learn when to use llms.txt vs the MCP server.

These docs are published in formats that large language models read cleanly. Use them to give any LLM accurate, current context about the Sarvam API — no scraping, no stale training data.

## What's available

| Resource                                                | What it contains                                                   | Best for                                             |
| ------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
| [`llms.txt`](https://docs.sarvam.ai/llms.txt)           | A structured index of every page with titles, links, and summaries | Retrieval — let a tool pick the right pages to load  |
| [`llms-full.txt`](https://docs.sarvam.ai/llms-full.txt) | The entire documentation concatenated into one file                | Pasting the whole corpus into a large context window |
| Per-page `.md`                                          | The clean Markdown source of any single page                       | Loading just one topic                               |

These follow the [llms.txt convention](https://llmstxt.org) and are regenerated with every docs deploy, so they always match what's published.

## Read any page as Markdown

Append `.md` to any documentation URL to get the raw Markdown, with no navigation or styling:

```bash
curl https://docs.sarvam.ai/api-reference-docs/getting-started/quickstart.md
```

This is the quickest way to drop a single page into an LLM prompt or a RAG index.

## How to use it

Paste the contents of [`llms-full.txt`](https://docs.sarvam.ai/llms-full.txt) into a model with a large context window when you want it to reason over the complete API in one shot.

Fetch [`llms.txt`](https://docs.sarvam.ai/llms.txt), then load only the linked pages you need (each is available as `.md`). This keeps prompts small and relevant.

Add `.md` to one page's URL and include just that page when the task is narrow (e.g. only text-to-speech streaming).

## When to use `llms.txt` vs the MCP server

Both make the docs available to AI — they suit different workflows:

|                  | `llms.txt` / Markdown                                          | [MCP server](/api-reference-docs/developer-tools/mcp) |
| ---------------- | -------------------------------------------------------------- | ----------------------------------------------------- |
| **How it works** | You fetch files and put them in the model's context            | The assistant searches the docs live, on demand       |
| **Best for**     | Bulk ingestion, RAG indexes, offline/one-shot context, scripts | Interactive coding sessions in Cursor / Claude Code   |
| **Freshness**    | A snapshot from when you fetched it                            | Always queries the current docs                       |
| **Setup**        | None — just a URL                                              | One-time client configuration                         |

**Rule of thumb:** use the MCP server when an assistant should pull docs *while you code*; use `llms.txt` when you want to load documentation into a model *yourself*.

## Related pages

* [MCP Server](/api-reference-docs/developer-tools/mcp)
* [SDKs & Libraries](/api-reference-docs/getting-started/sd-ks-libraries)
* [Errors & Troubleshooting](/api-reference-docs/errors-troubleshooting)