---
title: "Get companion chat history for a book"
method: GET
path: "/reader/books/{book_id}/companion/chat"
tags: ["AI"]
---

# Get companion chat history for a book

`GET /reader/books/{book_id}/companion/chat`

## Request

- Base URL: `https://localhost:9527`
- URL: `https://localhost:9527/reader/books/{book_id}/companion/chat`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/lxpio/apis/omnigram-api/docs/reader/books/:book_id/companion/chat/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns companion conversation messages for a specific book

## Path parameters

- `book_id` string, required

## Query parameters

- `since` integer
- `limit` integer
- `offset` integer

## Response `200`

Chat messages with server timestamp

- object
  - `data` SchemaCompanionChat[]
    - `book_id` string
    - `cfi` string
    - `chapter` string
    - `content` string
    - `ctime` integer
    - `id` integer
    - `role` string
    - `user_id` integer
  - `server_time` integer

## Other responses

- `400`: Bad Request

## Changes

- **2026-04-23** `20e19d9cbb5a`: 1 info
  - endpoint added
- **2026-03-21** `ffed97aaec4f`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/lxpio/apis/omnigram-api/changes/reader/books/:book_id/companion/chat/get.md)

---

[API](https://skmtc.dev/lxpio/apis/omnigram-api.md) - [All operations](https://skmtc.dev/lxpio/apis/omnigram-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lxpio/apis/omnigram-api/revisions/58911ffb3093?raw)
