Skip to content

Sessions

Generation runs can be grouped into a session — the same concept as a canvas in the Layer app. Sessions are optional, but useful for organizing runs that belong to one task or user interaction.

Both forge and workflow execute requests accept two optional fields:

Field Meaning
session_id Add the run to an existing session.
session_name Create (or name) a session for the run.
{
"model_id": "MODEL_ID",
"parameters": { "prompt": "a mossy stone golem" },
"session_name": "Golem concepts"
}

Runs created with the same session_id are grouped together, and appear together on that session’s canvas in the Layer app. If you omit both fields, the run is created without an explicit session.

  • Group the variations you generate for a single prompt or asset.
  • Keep an end user’s runs together so they show up as one canvas in-app.
  • Give a batch a stable session_id so you can reference the whole set later.