# execute_workflow

Run one of the workspace's saved workflows to produce images, videos, 3D models, or audio.

A workflow is a fixed pipeline the user built in Layer. Its steps are Layer's own  
operations: model generations, image/video/audio edits, text templating, fixed values,  
AI image judging, and filing outputs into the workspace's Drive. Every step reads and  
writes only the workspace's own files. \`inputs\` must match the input schema list\_workflows  
returns for the workflow. Spends Creative Units.

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.                                                                                                                                                                              |
