oneAI icon

oneAI

Interact with the oneAI API

Chat → Get

AI-generated

Summary

Retrieve details of a specific chat along with its messages, supporting pagination and message filtering by branch and time range.

Inputs

  • Chat ID (required) — The unique identifier of the chat to fetch.
  • Options — Optional parameters to control the result, including page size to limit messages per page, branch ID to specify a chat branch (defaulting to current), and cursor timestamps to filter messages before or after specific ISO date times.

Output shape

A single chat record including chat metadata and a paginated list of messages matching the specified filters.

Pagination is controlled by 'Page Size' in options; messages returned are filtered by optional 'Branch ID', 'Before' (ISO timestamp), and 'After' (ISO timestamp) parameters. If no branch is specified, the current branch is used by default.

Examples

Example 1: Fetch a chat and its recent 50 messages from the default branch, filtering messages sent after a given date.

Set 'Chat ID' to the chat's unique identifier, leave 'Branch ID' empty, set 'Page Size' to 50, and set 'After' to the desired ISO timestamp.

Links

Discussion