Skip to main content
Agents are driven through conversations. You create a conversation bound to an agent, then send messages to it:
  • CreatePOST /v1/conversations?assistant_id={agent_id}.
  • Chat (blocking)POST /v1/conversations/{conversation_id}/chat returns the final reply.
  • Stream a replyPOST /v1/conversations/{conversation_id}/stream (Server-Sent Events).
  • Tail eventsGET /v1/conversations/{conversation_id}/events (SSE for a run started elsewhere).
The streaming endpoints accept ?format=json for normalised {event, data} envelopes; omit it to receive raw Vercel AI SDK frames. Replace agent_id and your_api_key below.

Send a message and get the reply (blocking)

Simplest request/response. chat blocks until the agent finishes and returns its final message — use it when you only need the answer, not the intermediate steps.

Stream the reply token-by-token (SSE)

Streams the agent’s response as it is generated. Best for chat UIs — render text deltas, tool calls, and steps as they arrive instead of waiting for the whole answer. Events look like text-delta, finish-step, etc.

Tail an in-progress conversation (SSE)

Attach to the live event stream of a run that was started elsewhere — for example a message you sent asynchronously, or a run shared across workers. Pass ?etag= to resume from a specific point in the stream.

Send a message with file attachments

Attach files to a message via its files array. Each file needs a name plus either a public url or base64 b64_content (set type to the MIME type). A url is fetched server-side: it must be publicly reachable (private, loopback, and cloud-metadata addresses are rejected) and downloads are capped at 25 MB. This works with chat and with stream alike — the agent can read the attachment as part of the turn.
Use a public url for files already hosted somewhere (fetched server-side, max 25 MB); use b64_content to inline a local file or one behind auth. The agent needs an enabled file-capable tool (e.g. file attachment / code execution) to act on attachments.
Chat flows use the same conversation endpoints — create the conversation with settings.agent_flow_id set to the chat flow’s id instead of passing assistant_id, then chat / stream exactly as above.