Skip to main content

Retrieve Chat Session

Get details for a specific chat session including all messages.

Endpoint

Required Scopes

  • chat:read - Retrieve chat session details

Path Parameters

Response

Examples

Basic Retrieval

Continue Conversation

Retrieve messages and continue the conversation:

Export Conversation

Export conversation as markdown:

Analyze Conversation

Analyze conversation topics and sentiment:

Use Cases

Conversation History

Show conversation history in a UI:

Resume After Disconnect

Resume a conversation after user disconnects:
Search conversations by content:

Error Responses

401 Unauthorized

404 Not Found

429 Too Many Requests

Pricing

Retrieving sessions is free - no token usage.

Rate Limits

Best Practices

1. Cache Session Data

Cache retrieved sessions to reduce API calls:

2. Handle 404 Errors

Always handle missing sessions gracefully:

3. Limit Message History

Trim old messages to stay under context window:

4. Export Important Conversations

Regularly export conversations for backup:

Next Steps

Create Completion

Create a new chat completion

List Sessions

List all chat sessions

Streaming

Use streaming for real-time responses

Error Handling

Handle errors gracefully