> ## 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.

**docId** `string` *required*

Document ID.

**agentId** `string` *required*

Agent ID.

**input** `object`

Optional run input payload.

```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" } }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.