Raw: https://promptreports.ai/docs/api.md

# API reference

The same operations as the MCP server, over REST, with an OpenAPI document.

Base URL `https://api.promptreports.ai` (Proposed). OpenAPI at `/openapi.json`. Authenticate with an ID agent token in `Authorization: Bearer`.

| Method | Path | What it does |
|---|---|---|
| GET | `/v1/workflows` | List workflows |
| GET | `/v1/workflows/{id}` | One workflow, with its plan URL |
| POST | `/v1/runs` | Start a run: workflow, inputs, dry_run |
| GET | `/v1/runs/{id}` | A run and its steps |
| GET | `/v1/runs/{id}/events` | The run's events, append only |
| POST | `/v1/runs/{id}/cancel` | Cancel a run |
| GET | `/v1/records/{task_id}` | A signed record |
| GET | `/v1/usage` | Workflow requests used and left |

## Webhooks

`run.started` `run.waiting_approval` `run.completed` `run.failed` `usage.threshold`

## Example

```
POST /v1/runs
{ "workflow": "cost-per-outcome", "inputs": { "period": "2026-11", "budget": 4000 } }

201 Created
{ "run_id": "R-2046", "status": "running", "counted": true,
  "approvals_url": "https://app.promptreports.ai/approvals?run=R-2046" }
```
