Submit tool responses (Model Interface Protocol)
curl --request POST \
--url https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"responses": [
{
"tool_call_id": "call_abc123",
"content": {
"latitude": 40.7128,
"longitude": -74.006
},
"role": "tool"
}
]
}
'import requests
url = "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response"
payload = { "responses": [
{
"tool_call_id": "call_abc123",
"content": {
"latitude": 40.7128,
"longitude": -74.006
},
"role": "tool"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
responses: [
{
tool_call_id: 'call_abc123',
content: {latitude: 40.7128, longitude: -74.006},
role: 'tool'
}
]
})
};
fetch('https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'responses' => [
[
'tool_call_id' => 'call_abc123',
'content' => [
'latitude' => 40.7128,
'longitude' => -74.006
],
'role' => 'tool'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response"
payload := strings.NewReader("{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"chatUid": "550e8400-e29b-41d4-a716-446655440000",
"message": "Tool responses received, processing continues"
}Assistants
Submit tool responses (Model Interface Protocol)
Submit responses from client-side tool executions. Use this endpoint when the realtime status is “waiting_for_tool_response”. After submitting, continue polling the realtime endpoint for further updates.
POST
/
v1
/
assistants
/
{identifier}
/
chats
/
{chatUid}
/
tool-response
Submit tool responses (Model Interface Protocol)
curl --request POST \
--url https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"responses": [
{
"tool_call_id": "call_abc123",
"content": {
"latitude": 40.7128,
"longitude": -74.006
},
"role": "tool"
}
]
}
'import requests
url = "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response"
payload = { "responses": [
{
"tool_call_id": "call_abc123",
"content": {
"latitude": 40.7128,
"longitude": -74.006
},
"role": "tool"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
responses: [
{
tool_call_id: 'call_abc123',
content: {latitude: 40.7128, longitude: -74.006},
role: 'tool'
}
]
})
};
fetch('https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'responses' => [
[
'tool_call_id' => 'call_abc123',
'content' => [
'latitude' => 40.7128,
'longitude' => -74.006
],
'role' => 'tool'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response"
payload := strings.NewReader("{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}/tool-response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"responses\": [\n {\n \"tool_call_id\": \"call_abc123\",\n \"content\": {\n \"latitude\": 40.7128,\n \"longitude\": -74.006\n },\n \"role\": \"tool\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"chatUid": "550e8400-e29b-41d4-a716-446655440000",
"message": "Tool responses received, processing continues"
}Authorizations
Use JWT token for authentication
Path Parameters
The unique identifier of the assistant specialization
The unique identifier of the chat conversation
Body
application/json
Array of tool call responses
Show child attributes
Show child attributes
⌘I