# Build with AI

> Give your AI assistant or coding agent the whole Peak Solutions docs in one link.

Source: https://docs.peak.fo/docs/ai

These docs are built to be read by AI assistants and coding agents as well as people. Point your tool at one of the files below and it can write a working integration for you.

## Files for AI [#files-for-ai]

| File                               | What's in it                                                               |
| ---------------------------------- | -------------------------------------------------------------------------- |
| [`/llms.txt`](/llms.txt)           | A short index: key facts about the API, and a link to every page.          |
| [`/llms-full.txt`](/llms-full.txt) | Every page in one Markdown file. Best for pasting into a chat.             |
| [`/openapi.json`](/openapi.json)   | An OpenAPI 3.1 spec of every endpoint, for agents and code generators.     |
| Any page + `.md`                   | That page as Markdown, such as [`/docs/api/solve.md`](/docs/api/solve.md). |

Tools that send `Accept: text/markdown` get Markdown from any docs URL automatically.

Every page also has **Copy Markdown** and an **Open** menu at the top, to send the page straight to ChatGPT, Claude and other assistants.

## A prompt to start with [#a-prompt-to-start-with]

Paste this into your assistant, then describe what you're building:

```txt
Read https://docs.peak.fo/llms-full.txt. It documents the Peak Solutions API.
Write a function that solves Cloudflare Turnstile with POST /solve, sends my API key
in the X-API-Key header, and retries on error_code timeout, proxy_error and solve_failed.
```

## Migration [#migration]

Already using 2Captcha, Anti-Captcha, CapMonster Cloud or CapSolver? Peak Solutions answers their `createTask` API too, so most code needs only a new API address (`https://api.peak.fo`) and a new key. See [Switch from another solver](/docs/compat) for the task types and fields it accepts.

These pages give your assistant what it needs:

| Page                                                                 | What's in it                                                |
| -------------------------------------------------------------------- | ----------------------------------------------------------- |
| [`/docs/compat.md`](/docs/compat.md)                                 | What to change, and which task types work for each service. |
| [`/docs/compat/create-task.md`](/docs/compat/create-task.md)         | Every field `createTask` reads, and the ones it ignores.    |
| [`/docs/compat/get-task-result.md`](/docs/compat/get-task-result.md) | The solution shapes, and how long a result is kept.         |
| [`/docs/compat/errors.md`](/docs/compat/errors.md)                   | Every `errorCode`, and how native codes map to it.          |

Paste this, with your existing code below it:

```txt
Read https://docs.peak.fo/llms-full.txt, especially the "Compatible API" pages.
My code below uses another captcha solver's createTask API. Move it to Peak Solutions:
change the API address to https://api.peak.fo and the key to my Peak Solutions key,
and change only what the Compatible API pages say is different or unsupported
(callbackUrl is ignored, 2Captcha's in.php/res.php isn't available, finished tasks
are kept 5 minutes). Keep the rest of my code as it is.
```

Writing new code anyway? Ask for the native [`POST /solve`](/docs/api/solve) instead. It returns the result in one request, with no polling.
