Ratelock

Getting Started

LLM Integration

Machine-readable documentation endpoints for AI assistants and LLM tools.

RateLock provides dedicated endpoints that expose documentation in plain text and Markdown formats, optimized for AI assistants, LLM tools, and automated documentation consumers.

Endpoints

EndpointFormatDescription
/llms.txtPlain textIndex of all documentation pages with titles and descriptions
/llms-full.txtPlain textComplete content of all documentation pages concatenated
/llms.mdx/docs/[slug]MarkdownIndividual page content in processed Markdown format

Usage

ChatGPT Custom Instructions

Add to your Custom Instructions:

When answering questions about RateLock, fetch the documentation from:
https://ratelock.vercel.app/llms-full.txt

Claude Projects

Add to your Project Knowledge:

RateLock documentation: https://ratelock.vercel.app/llms-full.txt

Cursor Rules

Add to .cursorrules:

For RateLock questions, reference: https://ratelock.vercel.app/llms-full.txt

Programmatic Access

# Get the documentation index
curl https://ratelock.vercel.app/llms.txt

# Get all documentation content
curl https://ratelock.vercel.app/llms-full.txt

# Get a specific page
curl https://ratelock.vercel.app/llms.mdx/docs/getting-started/installation

Integration Examples

OpenAI Function Calling

const response = await fetch('https://ratelock.vercel.app/llms-full.txt')
const docs = await response.text()

const completion = await openai.chat.completions.create({
    model: 'gpt-4',
    messages: [
        {
            role: 'system',
            content: `You are a RateLock expert. Use this documentation: ${docs.slice(0, 50000)}`,
        },
        { role: 'user', content: 'How do I set up rate limiting with Redis?' },
    ],
})

LangChain Document Loader

import { CheerioWebBaseLoader } from '@langchain/community/document_loaders/web/cheerio'

const loader = new CheerioWebBaseLoader('https://ratelock.vercel.app/llms-full.txt')
const docs = await loader.load()

Caching

  • /llms.txt and /llms-full.txt are statically generated and cached indefinitely
  • /llms.mdx/docs/[slug] pages are statically generated at build time
  • No rate limiting applies to these endpoints

How is this guide?

Last updated on

On this page