---
title: "Get messages for a conversation"
method: GET
path: "/api/chat/{id}/messages"
tags: ["Chat"]
---

# Get messages for a conversation

`GET /api/chat/{id}/messages`

## Request

- Base URL: `https://api.llm-broker.net`
- URL: `https://api.llm-broker.net/api/chat/{id}/messages`
- Auth: HTTP bearer

Returns messages with cursor-based pagination.

## Path parameters

- `id` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Message list

- MessageList
  - `items` ChatMessage[]
    - `content` string, required
    - `id` string, required: Message CUID
    - `insertedAt` string, date-time
    - `role` 'user' | 'assistant' | 'system', required
  - `nextCursor` string, nullable

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/llm-broker/apis/astrioncore-core-api.md) · [All operations](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/llm-broker/apis/astrioncore-core-api/revisions/f85835487bf5?raw)
