---
title: "Generate Capability Document"
method: POST
path: "/core/agents/{agent_id}/capability-document"
tags: ["capability_documents"]
---

# Generate Capability Document

`POST /core/agents/{agent_id}/capability-document`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/agents/{agent_id}/capability-document`
- Auth: HTTP bearer

Start a generation. Manual trigger only — nothing calls this automatically.

`one_opus` is the default: it is the engine the reference documents were written by,
which is checkable rather than assumed — it titles a document the way a writer would
("GameStop"), and the staged engine cannot, because `extract` deliberately keeps the
platform label out of the persona and the title comes from the persona ("The
assistant"). Its coverage headers are written per document for the same reason.

Both engines now face `check_structure`, so neither can report a clean run on a
document with no sample conversation in it. `engine=question` still selects the staged
engine: it asks one question per capability and repairs what the checks reject, which
is the better shape when a config is thin enough that a single call has little to go on.

## Path parameters

- `agent_id` string, required

## Query parameters

- `config_version` integer, nullable
- `engine` string
- `org_slug` string

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Response `202`

Successful Response

- GenerateResponse
  - `agent_id` string, required
  - `workflow_id` string, required
  - `status` 'pending' | 'running' | 'ready' | 'quality_failed' | 'failed' | 'ineligible', required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
