LLMs & AI
Feed the Cosmos Pay docs and SDK to your LLM or coding agent with ready-made llms.txt files, per-page Markdown, and "Open in ChatGPT/Claude".
These docs are built to be consumed by LLMs and coding agents (Cursor, Claude, ChatGPT…), not just by humans. Copying the Markdown of a page is one option, but there's a lot more.
Ready-made context files
Two endpoints expose the whole documentation as plain text an LLM can ingest in one shot:
/docs/llms.txt: a compact index of every page with its title, URL and description./docs/llms-full.txt: the full text of every page, concatenated.
# the index
curl https://dev.cosmospay.lat/docs/llms.txt
# everything, in one file (great for a single prompt or a RAG ingest)
curl https://dev.cosmospay.lat/docs/llms-full.txtAny single page as Markdown
Every page has an actions menu (top-right of the page) with:
- Copy Markdown / View as Markdown: the raw Markdown source of that page.
- Open in ChatGPT / Open in Claude: opens the assistant pre-loaded with that page.
You can also fetch a page's Markdown directly by appending /content.md under /docs/llms.mdx:
# the quickstart page, as Markdown
curl https://dev.cosmospay.lat/docs/llms.mdx/sdk/server/quickstart/content.mdUse it in a prompt
Paste llms-full.txt (or a single page's Markdown) into your assistant and let it write the
integration, for example "Using this, create a Cosmos Pay checkout that charges 10 USDC and verifies
the payment with a webhook."
The Payments API as OpenAPI
The API reference is generated from an OpenAPI 3.0 document, and that document is published with these docs. Hand it to a coding agent, an API client or a code generator for the whole contract: every endpoint with its parameters, request body and responses.
curl https://dev.cosmospay.lat/docs/openapi.jsonThe SDK ships its own LLM docs
The @cosmosapp/pay_sdk package bundles an AI-readable llms/ folder, so once you install it
the docs are right there in node_modules, with no network needed:
node_modules/@cosmosapp/pay_sdk/llms/
├─ llms.txt # index
├─ llms-full.txt # everything in one file
└─ NN-*.md # one atomic topic per file# point your agent at the installed SDK docs
cat node_modules/@cosmosapp/pay_sdk/llms/llms-full.txtRunnable examples
The SDK repository keeps one runnable example per feature (payment intents, webhooks, the web client, customers, products, analytics, error handling). They make ideal few-shot material for an agent.
Embed a pay button or checkout
Take a payment on your own website with one script tag, using a button that opens the hosted checkout or a compact checkout drawn inside your page.
Overview
What the SDK is, its server and browser entry points, the three-step payment flow, and the key facts you must know.