List AI turns
GET
/api/v1/ai/turns
const url = 'https://example.com/api/v1/ai/turns';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/ai/turns \ --header 'Authorization: Bearer <token>'List the caller’s recent turns, newest first. Set limit to choose how many summaries to return. Each summary includes its status, prompt snippet, and file change count. Route: /api/v1/ai/turns. Inputs: limit. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer format: int64
Most turns to return, 1 to 100. Defaults to 50.
Responses
Section titled “Responses”The User’s recent turns, newest first
Media typeapplication/json
Array<object>
One row of Turn history.
object
change_count
required
Distinct Files items this turn changed.
integer format: int64
created_ms
required
integer format: int64
error_code
string | null
finished_ms
integer | null format: int64
id
required
string
kind
required
The server-side turn policy. Ask turns get a token with a read-only scope.
string
prompt_snippet
required
The first 200 characters of the User’s request.
string
provider
required
The official coding Agent selected by a prompt mention.
string
status
required
string
Example
[ { "kind": "agent", "provider": "claude" }]Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}