Getting Started
Generate your first file with the API in three steps.
Before you begin: create an account
API keys live in your account, so you need one first:
- Sign up at llms-txt.io/sign-up — with Google, or an email and password.
- If you signed up with email, verify it before logging in. We send a verification link to your inbox — click it before you try to sign in, or the login won't go through. Check your spam folder if it hasn't arrived in a minute. (Signing up with Google skips this step.)
- Sign in at llms-txt.io/login.
The API and managed sites are paid features — see Pricing. The web generator stays free and needs no account.
1. Create an API key
Once you're signed in, open Account → API keys and click Create key. Copy the key immediately — it's shown only once and looks like:
text
llmstxt_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Treat your key like a password. It's stored only as a hash on our side, so a lost key can't be recovered — just revoke it and create a new one.
2. Generate a file
Send a POST to the generate endpoint with your key in the x-api-key header:
bash
curl https://llms-txt.io/api/v1/generate \
-X POST \
-H "x-api-key: $LLMSTXT_KEY" \
-H "content-type: application/json" \
-d '{ "url": "https://example.com", "fileType": "both" }'
The response contains both files as strings:
json
{
"url": "https://example.com",
"domain": "example.com",
"fileType": "both",
"llmsTxt": "# Example\n\n> A one-line summary…",
"llmsFullTxt": "# Example\n\n## Page title\n…",
"llmEnhanced": true,
"note": null
}
3. Validate it (optional)
Lint a file — by URL or raw content — before you publish:
bash
curl https://llms-txt.io/api/v1/validate \
-X POST \
-H "x-api-key: $LLMSTXT_KEY" \
-H "content-type: application/json" \
-d '{ "url": "https://example.com" }'
What next?
- Want this to stay current without re-running it? Set up a managed site.
- Read the full Generate and Validate references.
- Learn how rate limits and errors work.
