Skip to main content
POST /v1/agents/{agent_id}/run takes two flavours of body. Use JSON for text-only runs; use multipart/form-data whenever you need to attach files.

Attach one or more files

Send the request as multipart/form-data and add a files field per attachment.
Either query or at least one file is required. You can send files with no text query if the agent’s system prompt fully covers what to do with them.

Shape the output with output_config

By default, the agent’s extracted_data follows the key definitions configured in the dashboard. To override that per-task, send an output_config object:
Both fields are optional individually:
  • output_schema: a JSON or natural-language schema describing the desired shape. Strings, numbers, arrays, and nested objects are all supported. This overrides any dashboard-defined keys for this task.
  • instructions: free-text guidance appended to the LLM’s output-format prompt. Use this for hints that don’t fit cleanly in the schema (“dates as YYYY-MM-DD”, “skip header rows”, etc.).

JSON body: text + schema

Multipart body: files + schema

When sending files, output_config is a string field carrying the JSON payload:
The multipart output_config value must be a JSON-encoded string. JSON inside multipart is a string field by convention; the server parses it after upload.

Reading the structured result

When the task completes, the structured payload is in the summary response under extracted_data:
Response
Use /result instead of /summary if you need the full reasoning trail (every tool call the agent made along the way). It’s useful during development, overkill in production.