Skip to content

    Quick or Stored Simulations: Which to Use

    Choose when you receive the result of a simulation, right away or later, and how long the result stays available to read.

    Choose a mode

    • Quick. For a single eligible text input, use inline delivery. Read the result from the successful start response. Keep that response if you need the result later. Poll and retry responses give the job status.
    • Temporary. For eligible draft text or a URL in pre-publish review or retrieval benchmark, use asynchronous delivery in ephemeral mode. Poll and read the result before it expires.
    • Stored. For comparisons that use saved revisions, use persistent mode. Poll for the result and read it while your access and its retention period remain valid.

    Estimate, start and read

    For pre-publish review and retrieval benchmark, set simulation_options.mode for the estimate and start. Keep your mode and delivery choice consistent across both requests.

    Use an Optimizer account and a key with access to the brand. The key needs analytics:read, optimizations:read and audits:read. To read the job, also grant collections:read. To request an estimate or start a run, use an editor, owner, or service role.

    1. Request a credit estimate with POST /v2/runs and estimate set to true. Keep the estimate ID and check when it expires. The estimate creates no run.
    2. Start the same workflow with POST /v2/runs. Use the same inputs, the estimate ID, your credit cap in max_units, and an Idempotency-Key header. When you retry, send the same key and request body.
    3. Follow the returned data.poll_url with GET /v2/runs/{run_id}. Read data.state before using the result. For paginated results, send meta.next_cursor as cursor on the next read.

    Estimates and result reads use zero credits. Delivered results can use credits up to the accepted estimate and your cap.

    For inline delivery, read data.inline_result from the successful start. For asynchronous delivery, wait for the job to finish before reading its result.