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

# Modes: direct, stream and background

> Like an LLM API: wait for the response, watch it arrive, or get notified.

| Mode | How | Response |
| - | - | - |
| Direct | (default) | `200` with the finished document and its `outputs`. If it takes more than 120 s, `202` and you continue with `GET`. |
| Stream | `"stream": true` | `text/event-stream` with the [events](/en/guides/events) until the end. |
| Background | `"background": true` | Immediate `202`. Follow with `GET /documents/{id}`, `/events` or [webhooks](/en/guides/webhooks) (coming soon). |

## Stream

```bash theme={null}
curl -N https://api.eu.doconda.com/v1/documents \
  -H "Authorization: Bearer $DOCONDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "format": "docx", "content": { "markdown": "# Internal memo\n\n..." }, "stream": true }'
```

```
id: 3
event: content.block_started
data: {"id":"evt_…","type":"content.block_started","sequence":3,…}
```

<Tip>
  If the connection drops, the document keeps being made. Reconnect with `GET /documents/{id}/events` and the `Last-Event-ID` header.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.