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>",
"activities": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"from": "user",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>",
"wait": {
"target": "url",
"point": "before_turn_start",
"reason": "<string>"
}
}
],
"activity": {
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"from": "user",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>",
"wait": {
"target": "url",
"point": "before_turn_start",
"reason": "<string>"
}
},
"assistantSegments": [
{
"seq": 2,
"text": "<string>",
"imageIds": [
"<string>"
]
}
],
"pendingWaits": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"target": "url",
"turnId": "<string>",
"asks": [
{
"hookId": "<string>",
"processor": "url",
"reason": "<string>",
"description": "<string>",
"score": 0.5
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"hookId": "<string>",
"point": "before_turn_start",
"preview": {
"title": "<string>",
"link": {
"label": "<string>",
"url": "<string>"
},
"note": "<string>",
"text": "<string>"
},
"processor": "url",
"reason": "<string>",
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolsetId": "<string>"
}
],
"textProgress": {
"inputSeqMax": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"text": "<string>",
"threadId": "<string>",
"turnId": "<string>",
"thinking": "<string>"
},
"withdrawn": [
{
"id": "<string>",
"reason": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"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>",
"activities": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"from": "user",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>",
"wait": {
"target": "url",
"point": "before_turn_start",
"reason": "<string>"
}
}
],
"activity": {
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"type": "user_message",
"failed": true,
"from": "user",
"preview": "<string>",
"toolCallId": "<string>",
"toolDescription": "<string>",
"toolName": "<string>",
"turnId": "<string>",
"wait": {
"target": "url",
"point": "before_turn_start",
"reason": "<string>"
}
},
"assistantSegments": [
{
"seq": 2,
"text": "<string>",
"imageIds": [
"<string>"
]
}
],
"pendingWaits": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"target": "url",
"turnId": "<string>",
"asks": [
{
"hookId": "<string>",
"processor": "url",
"reason": "<string>",
"description": "<string>",
"score": 0.5
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"hookId": "<string>",
"point": "before_turn_start",
"preview": {
"title": "<string>",
"link": {
"label": "<string>",
"url": "<string>"
},
"note": "<string>",
"text": "<string>"
},
"processor": "url",
"reason": "<string>",
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolsetId": "<string>"
}
],
"textProgress": {
"inputSeqMax": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"text": "<string>",
"threadId": "<string>",
"turnId": "<string>",
"thinking": "<string>"
},
"withdrawn": [
{
"id": "<string>",
"reason": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Path Parameters
Query Parameters
Response
Terminal state and final visible assistant text for the turn.