Build with AI
Feed the Stile docs to your AI assistant or coding agent — llms.txt, a full-corpus file, and the OpenAPI spec.
Most Stile integrations are now written with an AI assistant in the loop. These docs are published in machine-friendly formats so your assistant works from the real API surface instead of guessing:
| Resource | URL | What it is |
|---|---|---|
llms.txt | docs.stile.id/llms.txt | Index of every docs page with descriptions, per the llms.txt convention. |
llms-full.txt | docs.stile.id/llms-full.txt | The entire documentation as one markdown file — fits comfortably in modern context windows. |
| OpenAPI 3.1 spec | docs.stile.id/openapi.yaml | Machine-readable schema for every endpoint, request, and response. |
Using them
Coding agents (Claude Code, Codex, Cursor, Copilot Workspace) — point the agent at https://docs.stile.id/llms-full.txt in your prompt, or download it into the repo so it's part of the agent's searchable context:
curl -o docs/stile-docs.md https://docs.stile.id/llms-full.txtChat assistants (Claude, ChatGPT) — paste the contents of llms-full.txt into the conversation (or attach it as a file), then describe your stack and what you're building.
Cursor — add https://docs.stile.id/llms-full.txt as a custom docs source (Settings → Indexing & Docs), then reference it with @Docs in chat.
SDK generators and API tooling — consume https://docs.stile.id/openapi.yaml directly.
Starter prompt
A prompt that reliably produces a working integration — adjust the stack to yours:
You are integrating Stile age verification (docs: https://docs.stile.id/llms-full.txt).
My stack: Next.js App Router + TypeScript, deployed on Vercel.
My workflow ID: wf_YOUR_WORKFLOW_ID (already published in the Stile dashboard).
Build:
1. A POST /api/start-verification route that creates a verification session
with @stile/node using STILE_API_KEY, passing { type: "age",
workflow_id, email }, and returns { session_id, client_secret, methods,
age_tier } — this is the widget's session-url contract.
2. A checkout page that loads https://js.stile.id/v1/stile.js and renders
<stile-frame mode="modal" session-url="/api/start-verification"
workflow-id="wf_YOUR_WORKFLOW_ID">.
3. A POST /api/webhooks route that verifies the Stile-Signature header with
stile.webhooks.fromRequest() and STILE_WEBHOOK_SECRET, and marks the
order verified on verification_session.verified.
Rules: never trust the client-side stile:verified event for fulfillment —
only the signed webhook. Use stile_sk_ keys and test against the
500/month test quota. Never expose the secret key to the browser.Keep your assistant honest
The API requires workflow_id on every session and rejects a per-request methods array — models
trained on older API shapes sometimes invent use_case or products parameters. If the generated
code passes those, it predates the workflow model; re-point the assistant at the docs above.