> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Document Agent

> Run an agent against a single document.

## Overview

Runs a visible built-in or custom agent against one document.

<ParamField path="docId" type="string" required>
  Document ID.
</ParamField>

<ParamField path="agentId" type="string" required>
  Agent ID.
</ParamField>

<ParamField body="input" type="object">
  Optional run input payload.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/agents/agent_abc123/run \
    -H "Authorization: Bearer $OKRA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "input": { "prompt": "Extract key fields" } }'
  ```
</RequestExample>
