> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamlayer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversations

> Create a managed conversation, answer a question, and continue over multiple turns.

# 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:

```json theme={null}
{
  "conversation_id": "d34db33f-0000-4000-8000-000000000001",
  "respond": "Use warm evening light."
}
```

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

* [Run text-to-image](/agent-api/text-to-image)
* [Follow jobs and events](/agent-api/jobs-and-events)
