# Build with AI

# Build with AI

This site is written to be handed to an AI coding agent, not just read by a person.

## Prompt blocks

Every method page ([Get access token](/docs/api/token), [Check a token](/docs/api/token-info),
[List events](/docs/api/events), [Get event](/docs/api/event), [List races](/docs/api/races),
[Race results](/docs/api/race-results), [Event results](/docs/api/event-results)) has a **Prompt for AI
agents** panel near the bottom — click to
expand, then **Copy**. It's already full text in the page's HTML (never generated on click), so a crawling
agent or an `llms-full.txt` reader gets it without any interaction at all.

Each prompt is self-contained: base URL, the auth flow, that method's exact request/response shape, its
error codes with what to do about each, caching/`ETag` guidance, and what to build (a typed client function
plus a minimal test). It ends with "adapt to your actual stack" — the prompts are language-neutral by
design; paste the same one into an agent working in Python, TypeScript, C#, PHP, Go, or anything else.

## The full-integration prompt

[Overview → Full-integration prompt](/docs/overview#full-integration-prompt) covers the whole flow in one
prompt — auth, all five data calls, caching, error handling — enough for an agent to build a small working
integration (an events list + one event's results page) in a single pass, without reading any other page on
this site.

## Machine-readable companions

| File | Use |
|---|---|
| [`/llms.txt`](/llms.txt) | an index of every page on this site (per [llmstxt.org](https://llmstxt.org)) — point an agent at this to let it choose what to fetch |
| [`/llms-full.txt`](/llms-full.txt) | every page's full markdown, prompts included, concatenated into one file — feed this directly into a long-context model instead of crawling |
| `/docs/<page>.md` (e.g. [`/docs/api/events.md`](/docs/api/events.md)) | the raw markdown source of any single page, linked from its HTML page via `<link rel="alternate" type="text/markdown">` |
| [`/api/v1/openapi.json`](/api/v1/openapi.json) | OpenAPI 3.1 — the exact, current schema of every endpoint; every field this site documents is checked against it at build time |

## A good workflow

1. Point your agent at [`/llms.txt`](/llms.txt) or the [Overview](/docs/overview) page.
2. For a specific endpoint, hand it that method page's **Prompt** block directly — it's the fastest path to
   a correct client for just that call.
3. For a whole small integration, use the [full-integration prompt](/docs/overview#full-integration-prompt).
4. Have the agent generate types from [`/api/v1/openapi.json`](/api/v1/openapi.json) rather than
   hand-transcribing fields from this site, if your stack has an OpenAPI code generator — it'll never drift
   from what the API actually returns.
