Browse documentation
Retrieve one turn of a run
Retrieves one turn from the run's durable turn history: the same record
that listRunTurns returns. Requires run:read. Unlike getRun, it
returns the turn itself rather than the run around it, and it never
reads the technical event log. An expired run returns 410 with code
run_expired.
/runs/{runId}/turns/{turnId}Authorization
AuthorizationBearer <token>Path parameters
runIdstringrequired- pattern
"^run_[A-Za-z0-9]+$"
turnIdstringrequired- pattern
"^turn_[A-Za-z0-9]+$"
Response
The turn record.
One turn of a run's durable conversation. It holds what the turn was given, its final output, the deployment version that executed it and, when it stopped by error, why. It says nothing about technical events, which follow their own retention.
Additional properties are allowed.
idstringrequired- pattern
"^turn_[A-Za-z0-9]+$"
objectstringrequired- const
"turn"
statusstringrequired- enum
["queued","in_progress","cancelling","completed","failed","cancelled","incomplete"]
agent_versionintegerrequiredThe deployment version of the agent that executes this turn. It is pinned when the turn is admitted and never changes, so it still names the version that ran after the agent's active version moves on. A run can hold turns on different versions.
- minimum
1
inputarrayrequiredShow nested schema
Additional properties are allowed.
outputarrayrequiredShow nested schema
object1
Additional properties are allowed.
typestringrequired- const
"output_text"
textstringrequiredobject2
Additional properties are allowed.
typestringrequired- const
"output_file"
file_idstringrequiredfilenamestringrequiredmedia_typestringrequiredcreated_atintegerrequired- minimum
0
started_atinteger | nullrequired- minimum
0
completed_atinteger | nullrequired- minimum
0
duration_msinteger | nullrequired- minimum
0
errorunionrequiredWhy a failed or incomplete turn stopped, and null for every other status.
Show nested schema
null1
object2
The structured reason a turn stopped by error. code is a stable machine-readable reason and new codes can be added. retryable says whether sending the same work again can succeed. reference identifies the failure for support.
Additional properties are allowed.
codestringrequiredsourcestringrequired- enum
["provider","extension","runtime","platform","configuration"]
messagestringrequiredretryablebooleanrequiredreferencestringrequired