Source: https://docs.sogni.ai/agents/jobs/

# Agent jobs, assets and recovery

## [#](https://docs.sogni.ai/agents/jobs/#pick-the-execution-path)Pick the execution path

| Path | Use it when |
| --- | --- |
| [Direct media API](https://docs.sogni.ai/api-reference/) | You know the operation, model and parameters. Follow that endpoint's submission and retrieval contract. |
| [Durable creative workflows](https://docs.sogni.ai/sogni-intelligence/creative-agent-workflows/) | You have a multi-step plan and need a persisted handle, polling/events and recovery. |
| [Durable chat runs](https://docs.sogni.ai/sogni-intelligence/durable-chat-runs/) | The agent plans work interactively, including pauses for human input or cost approval. |

## [#](https://docs.sogni.ai/agents/jobs/#save-the-handle-before-waiting)Save the handle before waiting

Persist the returned run or workflow ID in your project. On a timeout or lost connection, retrieve that operation's status first. Follow its documented resume or cancellation action. Reconnecting to an event stream or downloading a result must not become a new generation request.

Use the idempotency mechanism documented for the selected endpoint. Do not assume a single header works on every Sogni route. Preserve the original request identity when retrying supported idempotent submissions; changing it can create another billed operation.

## [#](https://docs.sogni.ai/agents/jobs/#provide-usable-references)Provide usable references

A hosted service cannot read a path on your computer. Follow [media upload URLs](https://docs.sogni.ai/sogni-intelligence/media-upload-urls/) to send supported references. Use the original still image for image-to-video and first/last-frame work. Match aspect ratios and avoid deep crops. For a person's identity, provide authorized reference images; a name alone is insufficient.

## [#](https://docs.sogni.ai/agents/jobs/#retrieve-and-verify-results)Retrieve and verify results

Download assets you want to keep promptly; use the retention and URL-expiry rules of the endpoint. Inspect the downloaded media at native size. For video, check motion and listen to dialogue or music as well as checking appearance.

On failure, retain the operation ID and inspect the returned error, billing state and supported next action. Cancellation is not a promise that already completed work is unbilled. See [errors](https://docs.sogni.ai/api-reference/getting-started/#errors), [billing](https://docs.sogni.ai/sogni-intelligence/billing-and-cost-control/) and [refund terms](https://docs.sogni.ai/pricing/cancellation-and-refund-policy/).
