Get a turn snapshot
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/turns/{turnId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}', 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}"
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}"
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))
}{
"createdAt": "2023-11-07T05:31:56Z",
"elapsedMs": 123,
"eventCount": 123,
"resolvedConfig": {
"access": {
"builtIns": [
"<string>"
],
"roles": [
{
"id": "<string>",
"name": "<string>",
"version": 123
}
],
"toolsets": [
{
"namespace": "<string>",
"source": "managed",
"type": "mcp",
"id": "<string>",
"toolFilter": [
"<string>"
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"inputSchema": {},
"outputSchema": {},
"timeoutMs": 123
}
]
}
],
"version": "<string>",
"agentId": "<string>",
"conditional": [
{
"tool": "<string>",
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
}
]
},
"model": {
"apiFamily": "fake",
"contextWindowTokens": 123,
"id": "<string>",
"imageInputFormats": [
"jpeg"
],
"inputModalities": [
"text"
],
"maxOutputTokens": 123,
"outputModalities": [
"text"
],
"provider": "fake",
"providerModel": "<string>",
"supportsThinking": true,
"supportsTools": true,
"cacheRetention": "none",
"reasoningEffort": "minimal",
"thinkingBudgetTokens": 123
},
"source": {
"profileId": "<string>",
"profileVersion": 2
},
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"instructions": "<string>"
},
"status": "running",
"terminal": true,
"threadId": "<string>",
"turnId": "<string>",
"totalUsage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
},
"usage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
}
}{
"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 snapshot
GET
/
v1
/
threads
/
{threadId}
/
turns
/
{turnId}
Get a turn snapshot
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/turns/{turnId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/turns/{turnId}', 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}"
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}"
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))
}{
"createdAt": "2023-11-07T05:31:56Z",
"elapsedMs": 123,
"eventCount": 123,
"resolvedConfig": {
"access": {
"builtIns": [
"<string>"
],
"roles": [
{
"id": "<string>",
"name": "<string>",
"version": 123
}
],
"toolsets": [
{
"namespace": "<string>",
"source": "managed",
"type": "mcp",
"id": "<string>",
"toolFilter": [
"<string>"
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"inputSchema": {},
"outputSchema": {},
"timeoutMs": 123
}
]
}
],
"version": "<string>",
"agentId": "<string>",
"conditional": [
{
"tool": "<string>",
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
}
]
},
"model": {
"apiFamily": "fake",
"contextWindowTokens": 123,
"id": "<string>",
"imageInputFormats": [
"jpeg"
],
"inputModalities": [
"text"
],
"maxOutputTokens": 123,
"outputModalities": [
"text"
],
"provider": "fake",
"providerModel": "<string>",
"supportsThinking": true,
"supportsTools": true,
"cacheRetention": "none",
"reasoningEffort": "minimal",
"thinkingBudgetTokens": 123
},
"source": {
"profileId": "<string>",
"profileVersion": 2
},
"hooks": [
{
"id": "<string>",
"point": "before_turn_start",
"processor": {
"type": "url",
"agentId": "<string>",
"url": "<string>"
},
"asyncTimeoutMs": 123,
"match": {
"tools": [
"<string>"
],
"where": [
{
"op": "eq",
"path": "<string>",
"quantifier": "any",
"value": "<unknown>"
}
]
},
"onFailure": "fail_closed",
"timeoutMs": 123
}
],
"instructions": "<string>"
},
"status": "running",
"terminal": true,
"threadId": "<string>",
"turnId": "<string>",
"totalUsage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
},
"usage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
}
}{
"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
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
Turn status and resolved config snapshot.
Show child attributes
Show child attributes
Available options:
running, awaiting, idle, failed, cancelled Total billable model usage, including context compaction.
Show child attributes
Show child attributes
Show child attributes
Show child attributes