Skip to main content

Conversations

What this lets you do

Keep image work in a persistent conversation and continue it across multiple turns.

What you need

  • A server-side DreamLayer key
  • A conversation_id from the started event of an earlier execution
  • A new idempotency key for each new logical turn

Steps

1. Save the conversation ID

The first POST /v1/execute returns conversation_id and execution_id in the started event. Persist both opaque IDs.

2. Continue after a question

If the stream emits question and ends with done: needs_input, send a new request with the returned conversation ID:
Use a new idempotency key for this new logical turn.

3. List or delete conversations

  • GET /v1/conversations lists recent conversations owned by the key’s account.
  • DELETE /v1/conversations/{conversation_id} deletes a terminal owned conversation.
The API does not return a private routing plan with conversation state.

Confirm it worked

The next execution uses the same conversation_id and produces a new durable turn. V1 executes one workflow node per turn.

Common errors

  • 404: the conversation does not exist for the authenticated account.
  • 409: read canonical state before continuing a non-terminal execution.
  • A deleted conversation cannot accept another turn.

Troubleshooting

Persist the returned opaque ID exactly. Do not derive it from prompts, assets, or routing details.

Next steps