Chat Completions
Chat Completions
Send messages to your agent and receive AI-powered responses.
POST
Send a message to your agent and receive a response. The API follows a conversational format — pass the full message history to maintain context across turns.Documentation Index
Fetch the complete documentation index at: https://tinytalk.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Headers
| Header | Required | Description |
|---|---|---|
api-key | For private agents | Your Tiny Talk API key |
Content-Type | Yes | Must be application/json |
Body parameters
Your agent’s ID. Find it in the dashboard under Settings → General.
The conversation history. Each message is an object with
role and content.Whether to stream the response as server-sent events (SSE). Defaults to the agent’s stream setting if not specified.
Override the agent’s default AI model. Must be a model available on your plan. If omitted, the agent’s configured model is used.
Response
Streaming (default)
The API streams the response as server-sent events (SSE). Each chunk is prefixed withdata: and the stream terminates with data: [DONE]. After the stream completes, a message_payload event is sent containing any Knowledge Base sources cited in the response.
Non-streaming
Whenstream is set to false, the API returns a single JSON response with the complete message, token usage, and cited resources.
Website URLs from the Knowledge Base that were cited in the response. Only returned when Display Links to References is enabled in the messenger settings. Each object includes
id, url, title, and type.Multi-turn conversations
To maintain context across multiple exchanges, include previous messages in themessages array. The agent uses the full history to generate more relevant responses.