Skip to main content
The API calls each run an execution. A run normally moves through:
It can also end as failed, cancelled, or expired. The response includes links for status, events, and the receipt.

Statuses

completed, failed, cancelled, and expired are final statuses.

Submit once

Use a new Idempotency-Key for new work. If the network fails during submission, retry with the same key and identical body. Millwork returns the original operation instead of creating another run.

Wait for a final status

Poll links.status until the run ends. Do not submit a new run because the first one is still queued or running.

Read the result or failure details

  • After completed, request the result and receipt.
  • After failed, read status, events, and the receipt.
  • After cancelled or expired, read status and the receipt.
  • Echo never creates a model result.
For a complete command sequence, use Run a model.