Skip to main content
POST /api/v1/agent/chat runs your agent and answers in a single round trip. You send a message with a conversation id; Juryo keeps the conversation and replies. No session to create, no transcript to manage, no stream to parse unless you want the tokens as they arrive.
  • Base: https://chat.juryo.ai
  • Authentication: Authorization: Bearer sk_live_… — a secret key you create on the API channel (Settings → Integrations → Channels → API → Secret key). The channel’s publishable pk_live_… key — the one the website widget embeds and the Sessions API accepts — still works here for existing integrations; new servers should use the secret key
Measured on 17 August 2026 with a customer’s production agent: a complete reply in about 3 seconds (3.2 s on a cold start, 2.8–3.2 s warm), first token in about 2 seconds. The sessions API on the same agent: 6–11 s to a complete reply. Choose this endpoint when latency matters. Use the Sessions API instead when your integration needs the agent to ask you questions or approvals mid-conversation, long-running work, or cancel/clear/compact/reset controls — the comparison table there shows the two side by side.

The call

Send the next message with the same id — the agent remembers the conversation. Juryo owns the transcript: send only the new message, never a list of messages.

Response modes

Pick with the Accept header.

Streaming

Read the body as it arrives; the connection closes when the reply is complete. Send the next message with the same id once it has.

Event stream

Standard Server-Sent Events: every line is data: followed by one JSON object with a type; the stream ends with data: [DONE]. Any SSE client in any language reads it — no library required.
Concatenate the text-deltas to get the same text the JSON mode returns. Ignore event types you don’t handle — new ones may appear.

AI SDK clients

The event stream is the AI SDK UI message stream protocol (x-vercel-ai-ui-message-stream: v1 on the response), so AI SDK clients work against this endpoint out of the box — no adapter:
Pass the transport to useChat (React) or any other AI SDK chat client.

Authentication and keys

The bearer key is the one you create in Settings → Integrations → Channels → API. A key is bound to one agent — the key decides which agent answers — so create one key per agent you want to expose.
Keep the secret key on your server — never in a browser bundle or a mobile app. It is stored as a hash and shown once, when you create it. To rotate it, open the channel and click Regenerate: the old key stops working immediately. The publishable pk_live_… key is for the website widget and may appear in a page; this endpoint still accepts it so existing integrations keep working, but it is not the key to build a new server integration on.

Errors

In the streaming modes a failure mid-reply ends the stream early (the event stream sends an error event first); retry with the same id.

Good to know

  • Memory: the conversation is stored per agent and id, and replayed on every turn. Nothing else — no inbox thread, no contact — is created by this endpoint today.
  • Tools: the agent’s connected integrations (calendar, email via Composio) and the HTTP tools your admin defined run inline. WhatsApp-specific tools (contact and pipeline actions) are not on this surface.
  • Model and reasoning are whatever you configured for the agent in Settings → Agents; the same configuration drives both APIs.
  • A turn may run up to 300 s when tools are involved; typical is 3–5 s.