Markdown & llms.txt

View as Markdown

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

ResourceWhat it containsBest for
llms.txtA structured index of every page with titles, links, and summariesRetrieval — let a tool pick the right pages to load
llms-full.txtThe entire documentation concatenated into one filePasting the whole corpus into a large context window
Per-page .mdThe clean Markdown source of any single pageLoading just one topic

These follow the llms.txt convention. llms-full.txt and per-page .md exports are regenerated on every deploy; the llms.txt index is curated in fern/agents/llms.txt in this repository.

Read any page as Markdown

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

$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

1

Give an assistant the whole API

Paste the contents of llms-full.txt into a model with a large context window when you want it to reason over the complete API in one shot.

2

Index for retrieval

Fetch llms.txt, then load only the linked pages you need (each is available as .md). This keeps prompts small and relevant.

3

Pin a single topic

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 / MarkdownMCP server
How it worksYou fetch files and put them in the model’s contextThe assistant searches the docs live, on demand
Best forBulk ingestion, RAG indexes, offline/one-shot context, scriptsInteractive coding sessions in Cursor / Claude Code
FreshnessA snapshot from when you fetched itAlways queries the current docs
SetupNone — just a URLOne-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.

For docs contributors

The published llms.txt is sourced from fern/agents/llms.txt in this repo. When you add, rename, or remove a documentation page, update that file with a one-line entry: title, canonical .md URL, and a short summary copied from the page’s frontmatter description.

llms-full.txt and per-page .md exports are regenerated automatically on deploy — only the curated index needs a manual update.