Append a message to a thread
curl --request POST \
--url https://api.matrices.com/v1/threads/{threadId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"model": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: [{text: '<string>', type: 'text'}], model: '<string>'})
};
fetch('https://api.matrices.com/v1/threads/{threadId}/messages', 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}/messages"
payload = {
"content": [
{
"text": "<string>",
"type": "text"
}
],
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/messages"
payload := strings.NewReader("{\n \"content\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "running",
"threadId": "<string>",
"turnId": "<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
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Messages
Append a message to a thread
POST
/
v1
/
threads
/
{threadId}
/
messages
Append a message to a thread
curl --request POST \
--url https://api.matrices.com/v1/threads/{threadId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"model": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: [{text: '<string>', type: 'text'}], model: '<string>'})
};
fetch('https://api.matrices.com/v1/threads/{threadId}/messages', 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}/messages"
payload = {
"content": [
{
"text": "<string>",
"type": "text"
}
],
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/messages"
payload := strings.NewReader("{\n \"content\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "running",
"threadId": "<string>",
"turnId": "<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
}{
"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.
Headers
Identifies one submission attempt. Retrying with the same key returns the original admission with Idempotent-Replayed: true. Use a new key after changing any request field.
Path Parameters
Body
application/json
Ordered message content, bounded to 512 KiB of encoded JSON. At most 20 image blocks are permitted and image IDs must be unique within the message.
Required array length:
1 - 40 elements- Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
queue, steer, interrupt Optional concrete catalog model id selected from the target agent profile for queue or interrupt submissions; wildcard selectors are not accepted, and model is not accepted with steer.
Pattern:
^[^*]+$