# execute_workflow

Execute a workflow run to produce images or videos via a multi-step pipeline.

Returns immediately with a run ID. Poll with \`get\_workflow\_run\` for results.

Call \`get\_workflow\_instructions\` first for full workflow lifecycle guidance.

## Parameters

| Parameter             | Type          | Default | Description                                                                                                                                                                                                                                                                                  |
| --------------------- | ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| workflow\_idrequired  | string (uuid) | —       | ID of the workflow to execute.                                                                                                                                                                                                                                                               |
| inputs                | string        | {}      | A JSON object STRING mapping each of the workflow's input parameter keys to its value — e.g. '{"prompt": "a red panda astronaut"}'. This is a string: serialize the object yourself. Pass '{}' when the workflow takes no inputs. Use the input schema from \`list\_workflows\` to build it. |
| workspace\_idrequired | string (uuid) | —       | The user's workspace id.                                                                                                                                                                                                                                                                     |
| session\_id           | string (uuid) | —       | The Session ID to attach the results to.                                                                                                                                                                                                                                                     |
| session\_name         | string        | —       | Creates a new session with this name. One of \`session\_name\` or \`session\_id\` must specified, but not both.                                                                                                                                                                              |
