Runs

Start a generation run

Starts a model generation run in a project canvas using a prompt, workspace, project, optional model, and optional model parameters. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

post/runs/generation

Request body

type'image' | 'video' | 'audio' | 'text' required

Generation type

promptstring required

Generation prompt

modelstring

Model endpoint ID

workspace_idstring required

Workspace identifier

project_idstring required

Project identifier

paramsobject

Model parameters

Example request

{
  "prompt": "A cinematic product photo of a ceramic mug on a sunlit table",
  "model": "t2i-flux-2-pro",
  "workspace_id": "ws_abc123",
  "project_id": "prj_abc123"
}

Response

Generation run started.

run_idstring required

Run identifier

type'generation' | 'technique' | 'action' required

Run type

estimated_secondsinteger nullable required
charged_costnumber required

Cost charged in USD

poll_urlstring uri nullable
project_idstring nullable

Project identifier

Example response

{
  "run_id": "run_abc123",
  "model": {
    "model_id": "t2i-flux-2-pro"
  },
  "technique": {
    "technique_id": "tech_abcd1234"
  },
  "action": {
    "action_id": "split-text"
  },
  "project_id": "prj_abc123"
}

Changes

Changed in 5 of the 8 revisions of this API.91314

  • 2f4a714f8ce912See the full diff
    • added the new action enum value to the type response property for the response status 201

      response-property-enum-value-added

    • endpoint deprecated

      endpoint-deprecated

    • added the optional property action to the response with the 201 status

      response-optional-property-added

  • 3b683901714c42See the full diff
    • added the new required request property project_id

      new-required-request-property

    • added the new required request property prompt

      new-required-request-property

    • added the new required request property type

      new-required-request-property

    • added the new required request property workspace_id

      new-required-request-property

    • added the new optional request property model

      new-optional-request-property

    • added the new optional request property params

      new-optional-request-property

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 5546855ea637168See the full diff
    • removed the required property workflow_run_id from the response with the 201 status

      response-required-property-removed

    • removed the request property model

      request-property-removed

    • removed the request property params

      request-property-removed

    • removed the request property project_id

      request-property-removed

    • removed the request property prompt

      request-property-removed

    • removed the request property type

      request-property-removed

    • removed the request property workspace_id

      request-property-removed

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 402

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 409

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the non-success response with the status 500

      response-non-success-status-added

  • 4a457dc80f1e42See the full diff
    • added the new required request property project_id

      new-required-request-property

    • added the new required request property prompt

      new-required-request-property

    • added the new required request property type

      new-required-request-property

    • added the new required request property workspace_id

      new-required-request-property

    • added the new optional request property model

      new-optional-request-property

    • added the new optional request property params

      new-optional-request-property

    • removed the request property model

      request-property-removed

    • removed the request property params

      request-property-removed

    • removed the request property project_id

      request-property-removed

    • removed the request property prompt

      request-property-removed

    • removed the request property type

      request-property-removed

    • removed the request property workspace_id

      request-property-removed