Get a turn
const url = 'https://example.com/api/v1/ai/turns/example';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/example \ --header 'Authorization: Bearer <token>'Return one of the caller’s turns. The response includes its prompt, current status, and recorded file changes. Route: /api/v1/ai/turns/{id}. Inputs: id. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
Files, Notes and Tasks writes made with this turn’s token, newest first.
One attributed write. The item ID is the stable identity for /f/<item-id>.
object
Previous path for a move.
Files change-feed operation: create, write, move or trash.
Home-relative path right after the change.
Stable failure or cancellation reason, for example credential_removed.
Unix time in milliseconds when the turn reached a final state.
The server-side turn policy. Ask turns get a token with a read-only scope.
The User’s request as it was sent, without the server’s framing.
The official coding Agent selected by a prompt mention.
queued, running, completed, failed, cancelled, undoing or undone.
Example
{ "kind": "agent", "provider": "claude"}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}