Run the agent

Give a goal in plain words; the agent plans and runs MarqPDF operations on your files with the model you chose (pipeline "agent"), reading each result before the next step. output.text is its summary, output.files the files it hands back, output.steps every call it made. Each operation it runs counts as one. Counts as one operation when it succeeds.

post/agent

Request

  • Base URL: https://marqpdf.com/v1
  • URL: https://marqpdf.com/v1/agent
  • Auth: HTTP bearer

Request body

filesstring[] required

File ids, in order.

goalstring required

What to do, e.g. 'make these scans searchable, merge them in date order and get the result under 2 MB'.

max_stepsinteger

Model turns before it stops.

modelstring

"marqpdf" (the default) or "provider/model" on a key you've added, e.g. "anthropic/claude-opus-5-5", "openai/gpt-5.1", "gemini/gemini-2.5-pro", "openrouter/…", "custom/…".

waitinteger

Seconds to wait for the result before answering 202 with a job to poll. 0 = answer at once.

webhook_urlstring uri

POSTed the finished job, signed with your webhook secret (MarqPDF-Signature).

Example request

{
  "model": "anthropic/claude-opus-5-5"
}

Response

Finished: the job with its output

object'job' required
idstring required
operationstring required
status'queued' | 'running' | 'succeeded' | 'failed' required
created_atstring date-time required
started_atstring nullable
finished_atstring nullable
webhook_urlstring nullable
webhookobject nullable

Example response

{
  "id": "job_3Fq…",
  "output": {
    "files": [
      {
        "id": "file_8rX2…"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.