Chat
Send a list of messages and stream back the assistant's reply. The smart router picks a model for you (or pin one); group turns into a conversation for multi-turn context.
One call
Chat and Agent runs are two modes of the same system. Most of the time you don't need to distinguish — send a task to /agent/runs and the platform auto-routes. This page covers the /chat endpoint for when you specifically need a pure text reply (no tools, lowest latency, OpenAI-style messages array).
POST/v1/workspaces/{workspace_id}/chat — send a list of messages and stream back the assistant's reply. Request body:
messages(required) — an array of{role, content};roleissystem,user,assistant, ortool.model— optional; omit (or leave empty) to let Nexevo's router pick the best model. Pin only to force a specific one.max_tokens— defaults to4096(1–128000).temperature— defaults to0.7(0–2).intent_hint— a short task-type hint that bypasses the intent classifier when the caller already knows the kind of request.conversation_id— thread this turn under an existing conversation. When set, the server rebuilds prior history from the database, somessagesonly needs to carry the new user turn.project_id— run inside a project; its instructions and knowledge files are injected server-side (access-checked).images— up to 4 image URLs (OSS) for vision chat; the router picks a vision-capable model and converts the last user turn into a multimodal message.
The reply streams as Server-Sent Events — one JSON object per data: line: {delta: "..."} for assistant text, {reasoning: "..."} for the chain-of-thought, an optional leading {context_compacted: {summary, turns_folded}} when earlier turns were summarized, and {error: "..."} on failure. The stream ends with data: [DONE]. (This is a different wire format from agent runs, whose events carry a type field.)
curl -N https://nexevo.ai/v1/workspaces/$NEXEVO_WORKSPACE/chat \
-H "Authorization: Bearer $NEXEVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Explain SEPA Instant in two sentences."}]
}'Leave model empty to let Nexevo's router pick the best model for the task (quality / cost / latency balanced). Pin model only when you need a specific one.
Conversations (multi-turn)
To keep context across turns, create a conversation and append messages to it:
POST
/v1/workspaces/{workspace_id}/conversations— create a thread (title, optionalproject_id).POST
/v1/workspaces/{workspace_id}/conversations/{conversation_id}/messages— append a message (role,content).GET
/v1/workspaces/{workspace_id}/conversations/ GET/v1/workspaces/{workspace_id}/conversations/{conversation_id}— list / fetch threads.PATCH
/v1/workspaces/{workspace_id}/conversations/{conversation_id}— rename / archive.POST
/v1/workspaces/{workspace_id}/conversations/{conversation_id}/share/ DELETE/v1/workspaces/{workspace_id}/conversations/{conversation_id}/share— mint / revoke a read-only public link.DELETE
/v1/workspaces/{workspace_id}/conversations/{conversation_id}— delete a thread.
Pass a conversation's project_id to ground the thread in a project's instructions + files.