Why runs and tasks are separate
Every time a human edits a document in the Overten web app, the agent resumes where it left off — it remembers the bookmark IDs, sheet names, chart references, and structural decisions it made in earlier turns. The API works the same way. Keeping the run alive across calls means:- Turn 2 costs a fraction of turn 1, because the agent loads saved state instead of re-inspecting the full document.
- Follow-up prompts are coherent — “move the revenue chart to the executive summary” works because the agent knows where both sections are.
- You store one
run_idalongside your own record; no extra state to maintain on your side.
Creating a run
You don’t create a run explicitly. The first call to any generation endpoint without arun_id creates one automatically:
run_id with whatever record in your system represents this document — you’ll need it to resume.
Resuming a run
Pass the samerun_id on any subsequent call to continue working on the same document:
- The agent’s conversation state is restored from Overten’s durable store, keyed on
run_id. - The last saved document bytes are reloaded into the same run context.
- Your new prompt is appended as a fresh user message.
- The agent continues, using everything it already built.
download_urlin the response points to the updated document after this turn.
Tasks
Each call to a generation endpoint produces a task. In sync mode (the default), the task lifecycle is hidden — you wait for the response and get the finished result. In async mode, you receive atask_id immediately and poll for the result:
Listing runs
Retrieve recent runs for your organization with cursor-based pagination:next_cursor as the cursor query parameter on your next request to page forward. Results are newest-first.
Downloading a run’s output
Two options, both pointing at the same file:<a href> — the redirect saves an extra round-trip. Option A is useful when you need the full run metadata alongside the URL.
Exporting to other formats
Convert a completed run’s output to PDF, PNG, or other formats without re-running the agent:| Source | Available targets |
|---|---|
xlsx | pdf, csv, png, html |
docx | pdf, html, txt, odt |
pptx | pdf, png, odp |
/export?format=pdf twice for the same run only runs the conversion once.
Retention policy
Runs are retained for 30 days after their last task. After that window:GET /runs/{run_id}still resolves for audit purposes, but the run’sstatusis markedexpired.- Resuming an expired run returns
410 Gone. Start a fresh run instead — you cannot restore expired state. - The saved document bytes are removed from storage 30 days after expiry.
Enterprise customers can extend the default 30-day retention window. Contact support@overten.ai for details.

