Chats
A chat is a tutoring conversation between one of your students and a persona about a subject and topic. Chats keep context across messages and can stream responses token-by-token. Requires the ask app.
The chat object
| Attribute | Type | Description |
|---|---|---|
id |
uuid | Chat identifier |
subject |
object | The subject the chat is about |
topic |
object | The topic within the subject |
persona |
object | The persona answering |
messages |
array | Ordered messages (id, role, content, optional image_transcription, optional file) |
usage |
object | total_tokens for billing |
warning |
object | Present as the conversation approaches its length limit |
Image uploads and image_transcription
When a student’s message includes an image, we OCR it server-side and the
tutor anchors its reading of the image to that transcription. On user
messages, content is always the student’s typed text only; the OCR
text is returned separately as image_transcription (present only when a
transcription exists). Render it as you see fit — e.g. a small
“text we read from your image” element. Assistant messages never carry
this field.
Endpoints
- Create a chat —
POST /api/v1/chats - Send a message —
POST /api/v1/chats/:id/messages - Retrieve a chat —
GET /api/v1/chats/:id