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" } }'
Agents
Run Document Agent
Run an agent against a single document.
POST
/
v1
/
documents
/
{docId}
/
agents
/
{agentId}
/
run
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" } }'
Overview
Runs a visible built-in or custom agent against one document.string
required
Document ID.
string
required
Agent ID.
object
Optional run input payload.
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" } }'