Skip to main content
GET
Get conversation spans
Returns all spans recorded for a conversation. Each span carries parent_span_id, so you can nest them: a polyai.turn contains the LLM, function and retrieval spans that produced that turn. Function spans carry span_id values you can pass to search function logs to read what that execution wrote.

Request

Headers

string
required
Account API key with read access to conversations.

Path parameters

string
required
The conversation to fetch.

Query parameters

string
The agent the conversation belongs to. Optional with an account API key.

Response

string
string
integer
Number of spans returned, at most 10,000.
object[]
Ordered by timestamp ascending.

Example

Errors

Last modified on November 10, 2026