# For AI agents

URL: https://submitator.com/docs/for-ai-agents

> Every page as Markdown, all the docs in one file and the OpenAPI document, for AI assistants and coding agents that build with the API.

These docs come in forms that AI assistants and coding agents read well. Point your tool at them, or paste a page into a chat, when you build an integration.

## The docs as Markdown

| What | Where |
| --- | --- |
| Any page | Its URL with `.md` added, such as `https://submitator.com/docs/quickstart.md`. The docs home is `https://submitator.com/docs.md`. |
| The index | `https://submitator.com/llms.txt` lists every page with one line about it, in the order of the sidebar. |
| Everything in one file | `https://submitator.com/llms-full.txt` holds every page, the reference included. |

Each page also has 3 buttons under its title. **Copy as Markdown** puts the page on your clipboard, **Open in Claude** starts a chat with Claude that reads the page, and **View as Markdown** opens the twin.

## The OpenAPI document

`GET https://api.submitator.com/v1/openapi.json` returns the reference as an OpenAPI 3.1 document, with the operations that are released. It needs no key, so a tool that generates clients or calls APIs can load it directly.

## A brief for your coding agent

These rules keep generated code in line with what the API expects. Paste them into your agent's instructions:

```text
You are building a client for the Submitator API at https://api.submitator.com/v1.
Docs: https://submitator.com/llms-full.txt. OpenAPI: https://api.submitator.com/v1/openapi.json.
- Read the key from the SUBMITATOR_API_KEY environment variable and send it as
  "Authorization: Bearer" and the key. Never print it, log it or write it into code.
- Build and test with a sbm_test_ key: test mode spends nothing.
- Call the API from a server only: it sends no CORS headers.
- Treat ids such as prj_... as opaque strings, and store them as text.
- On an error, branch on error.code, never on error.message, and log error.request_id.
- Send an Idempotency-Key with every POST you may retry, and the same key on the retry.
- Page through lists by sending next_cursor back as cursor.
- Check every webhook's signature with the official Standard Webhooks library
  before trusting it, and skip a webhook-id you have handled.
- A launch spends 1 launch and cannot be undone. Check GET /projects/{project_id}/readiness first.
```

## Keep keys out of chats

Never paste a key into a chat or a prompt. Give the agent the name of the variable, and let your server read its value. If a key reached a chat, roll it in the console with "now" before you go on.
