13 articles
API reference
The REST API: keys, authentication, the streaming chat endpoint, every event and error code, rate limits, request ids and the workflows API.
- API overviewWhat the SentientOne API does, its base URL, the endpoints you'll use and how requests, streams and errors fit together.Reference2 min
- API keys: secret and publishableThe two kinds of SentientOne key, where to find them, where each one may be used, and what to do if a secret key leaks.Reference2 min
- Test requests on the API keys pageSend a real request to any of your agents from the app, watch the events stream in, and copy ready-made cURL, TypeScript or Python.Guide2 min
- AuthenticationThe headers every API call needs: X-Api-Key and X-Agent-Id, plus the optional X-Llm-Key, X-Request-Id and X-Perf-Timing.Reference2 min
- POST /v1/chat/streamThe chat endpoint field by field: request body, limits, what the agent does with each request and how the streamed reply ends.Reference2 min
- Streaming eventsEvery server-sent event the chat stream can send, in order, with each field, plus how to parse the stream safely.Reference3 min
- Conversations and historyHow conversation_id works, how much history the model sees, and where conversations from every channel show up.Reference1 min
- Errors and error codesThe error envelope, every error code the chat, widget, workflow and ingest endpoints return, its HTTP status and what to do about it.Reference3 min
- Rate limitsPer-agent requests per minute, widget limits per key and per visitor, workflow limits, the X-RateLimit headers and how to retry.Reference1 min
- Request ids and correlationSend X-Request-Id and follow one request through the API, its trace, error reports, your model provider, MCP servers and webhooks.Reference1 min
- Latency and performanceMeasured timings for a reply, what SentientOne does to keep them low (caches, hedged calls, retries) and how to time your own requests.Reference2 min
- Workflows APIStart live runs of published workflows with POST /v1/workflows/run or a webhook, read step events, and handle run errors.Reference2 min
- Code examplesCopy-ready examples: cURL, a Node stream reader, a Next.js route that keeps your key server-side, and async Python with conversations.Guide4 min
Still stuck?
Email us with what you tried and any request id. A person replies.