Get a turn result
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "running",
"terminal": true,
"text": "<string>",
"threadId": "<string>",
"turnId": "<string>",
"activity": {
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"fromAgentId": "<string>",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>"
},
"pendingWaits": [
{
"id": "<string>",
"target": "url",
"turnId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"hookId": "<string>",
"point": "before_turn_start",
"processor": "url",
"reason": "<string>",
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolsetId": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Threads
Get a turn result
GET
/
v1
/
threads
/
{threadId}
/
turns
/
{turnId}
/
result
Get a turn result
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "running",
"terminal": true,
"text": "<string>",
"threadId": "<string>",
"turnId": "<string>",
"activity": {
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"fromAgentId": "<string>",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>"
},
"pendingWaits": [
{
"id": "<string>",
"target": "url",
"turnId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"hookId": "<string>",
"point": "before_turn_start",
"processor": "url",
"reason": "<string>",
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolsetId": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Use a turn ID, or active for the open event-backed turn, latest for the most recent event-backed turn, or current for the open event-backed turn when one exists and the latest event-backed turn otherwise.
Response
Terminal state and final visible assistant text for the turn.
Available options:
running, awaiting, idle, failed, cancelled Safe-to-show, bounded metadata for one committed thread event. It never contains raw tool arguments, results, wait payloads, or principals.
Show child attributes
Show child attributes
Pending waits for the turn. toolInput is present for platform connection waits and for before_tool_call client approval waits up to 256 KiB; it is absent for every other wait kind.
Show child attributes
Show child attributes