# Ask Zo

Send a message to your Zo and stream the response.

## POST /zo/ask

Send a message to your Zo and get a response. This is the same Zo you talk to in the app — your files, integrations, and tools are all available.

```bash
curl -X POST https://api.zo.computer/zo/ask \
  -H "Authorization: Bearer zo_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello, Zo!"}'
```

### Request body

**input (string, required)**

Your message to Zo.

**conversation\_id (string)**

Continue an existing conversation. Omit to start a new one.

**model\_name (string)**

Override the default model (use [`GET /models/available`](/reference/api-reference/models) to list options).

**persona\_id (string)**

Override the active persona (use [`GET /personas/available`](/reference/api-reference/personas) to list options).

**output\_format (object)**

JSON Schema for structured output. When set, `output` in the response is an
object matching the schema instead of a string.

**stream (boolean, default: false)**

Enable streaming mode. Returns Server-Sent Events (SSE) instead of JSON.

### Response

```json
{
  "output": "Done! Added 52% humidity reading for today.",
  "conversation_id": "conv_abc123"
}
```

**output (string | object)**

Zo's response. An object if `output_format` was specified.

**conversation\_id (string)**

ID to continue this conversation in subsequent requests.

### Streaming response

When `stream: true`, the endpoint returns a Server-Sent Events stream with `Content-Type: text/event-stream`. Each event has the format:

```
event: <EventType>
data: <JSON>
```

Event types:

- `FrontendModelResponse` — text chunk from the model (`data.content`)
- `End` — stream completed (includes `data.output` if `output_format` was specified)
- `Error` — error occurred (`data.message`)

The `x-conversation-id` response header contains the conversation ID for follow-up requests.

### Continuing a conversation

Use the returned `conversation_id` to continue the conversation:

```bash
curl -X POST https://api.zo.computer/zo/ask \
  -H "Authorization: Bearer zo_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": "What did I just ask you?", "conversation_id": "conv_abc123"}'
```
