Get chat history for a conversation
curl --request GET \
--url https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}"
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))
}HttpResponse<String> response = Unirest.get("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chatUID": "550e8400-e29b-41d4-a716-446655440000",
"clientUID": "f9a44905-3193-4bd2-a81a-71156aa7eb66",
"userUID": "7a735eda-69e7-420b-9507-6abf80ad2e34",
"name": "Solar panel recommendations",
"archived": true,
"assistantSpecializationIdentifier": "550e8400-e29b-41d4-a716-446655440000",
"chatContent": [
{
"uid": "75ecbcfc-a3be-43ba-8da6-b3e16e8d7280",
"chatUid": "550e8400-e29b-41d4-a716-446655440000",
"role": "user",
"content": {
"message": "I would recommend a 450 W monocrystalline panel.",
"data": {},
"files": [
{
"name": "invoice.pdf",
"donwloadUrl": "https://files.devic.ai/uploads/invoice.pdf",
"fileType": "DOCUMENT"
}
]
},
"timestamp": 1706000000000,
"userUID": "api-key:42",
"summary": "The user asks which panels to install on a 60 m2 roof.",
"contentSource": "finish_tool",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_user_location",
"arguments": "{}"
}
}
],
"tool_call_id": "call_abc123",
"latencyMs": 1045,
"messageTokenUsage": {
"inputTokens": 123,
"outputTokens": 123,
"inputCachedTokens": 123,
"inputCacheWriteTokens": 123,
"outputCachedTokens": 123,
"reasoningOutputTokens": 123,
"totalTokens": 123,
"provider": "<string>",
"model": "<string>",
"reasoningEffort": "none"
},
"messageCost": {
"inputCost": 123,
"outputCost": 123,
"inputCachedCost": 123,
"inputCacheWriteCost": 123,
"outputCachedCost": 123,
"reasoningOutputCost": 123,
"totalCost": 123,
"currency": "USD",
"calculatedAt": 123
}
}
],
"creationTimestampMs": 1789630543006,
"lastEditTimestampMs": 1789630572077,
"llm": "gpt-4.1",
"provider": "open-ai",
"contextWindow": 1050000,
"inputTokens": 6380,
"outputTokens": 372,
"tokenUsage": {
"model": "<string>",
"provider": "<string>",
"inputTokens": 123,
"outputTokens": 123,
"inputCachedTokens": 123,
"inputCacheWriteTokens": 123,
"outputCachedTokens": 123,
"reasoningOutputTokens": 123,
"totalCachedTokens": 123,
"cost": {
"inputCost": 123,
"outputCost": 123,
"inputCachedCost": 123,
"inputCacheWriteCost": 123,
"outputCachedCost": 123,
"reasoningOutputCost": 123,
"totalCost": 123
},
"secondaryCost": 123,
"secondaryInputTokens": 123,
"secondaryOutputTokens": 123,
"secondaryByOperation": {},
"pricingTimestamp": 123
},
"metadata": {},
"tenantId": "tenant_12345",
"tags": [
"support",
"onboarding"
],
"stopReason": "max_chat_messages_reached",
"triggerSource": {},
"guardrailResults": {},
"handedOff": true,
"handedOffSubThreadId": "64f5a5b8c123456789abcdef",
"pausedUntil": 123,
"pausedReason": "<string>",
"recalledMemories": [
{}
],
"coreMemories": [
{}
],
"compactions": [
{}
],
"reasoningEffort": "none",
"effectiveReasoningEffort": "none"
}Assistants
Get chat history for a conversation
One conversation with all its messages, plus the model, tokens, cost and the memory or compaction events it went through. 404 when the conversation does not exist or belongs to another assistant.
GET
/
v1
/
assistants
/
{identifier}
/
chats
/
{chatUid}
Get chat history for a conversation
curl --request GET \
--url https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}"
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))
}HttpResponse<String> response = Unirest.get("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants/{identifier}/chats/{chatUid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chatUID": "550e8400-e29b-41d4-a716-446655440000",
"clientUID": "f9a44905-3193-4bd2-a81a-71156aa7eb66",
"userUID": "7a735eda-69e7-420b-9507-6abf80ad2e34",
"name": "Solar panel recommendations",
"archived": true,
"assistantSpecializationIdentifier": "550e8400-e29b-41d4-a716-446655440000",
"chatContent": [
{
"uid": "75ecbcfc-a3be-43ba-8da6-b3e16e8d7280",
"chatUid": "550e8400-e29b-41d4-a716-446655440000",
"role": "user",
"content": {
"message": "I would recommend a 450 W monocrystalline panel.",
"data": {},
"files": [
{
"name": "invoice.pdf",
"donwloadUrl": "https://files.devic.ai/uploads/invoice.pdf",
"fileType": "DOCUMENT"
}
]
},
"timestamp": 1706000000000,
"userUID": "api-key:42",
"summary": "The user asks which panels to install on a 60 m2 roof.",
"contentSource": "finish_tool",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_user_location",
"arguments": "{}"
}
}
],
"tool_call_id": "call_abc123",
"latencyMs": 1045,
"messageTokenUsage": {
"inputTokens": 123,
"outputTokens": 123,
"inputCachedTokens": 123,
"inputCacheWriteTokens": 123,
"outputCachedTokens": 123,
"reasoningOutputTokens": 123,
"totalTokens": 123,
"provider": "<string>",
"model": "<string>",
"reasoningEffort": "none"
},
"messageCost": {
"inputCost": 123,
"outputCost": 123,
"inputCachedCost": 123,
"inputCacheWriteCost": 123,
"outputCachedCost": 123,
"reasoningOutputCost": 123,
"totalCost": 123,
"currency": "USD",
"calculatedAt": 123
}
}
],
"creationTimestampMs": 1789630543006,
"lastEditTimestampMs": 1789630572077,
"llm": "gpt-4.1",
"provider": "open-ai",
"contextWindow": 1050000,
"inputTokens": 6380,
"outputTokens": 372,
"tokenUsage": {
"model": "<string>",
"provider": "<string>",
"inputTokens": 123,
"outputTokens": 123,
"inputCachedTokens": 123,
"inputCacheWriteTokens": 123,
"outputCachedTokens": 123,
"reasoningOutputTokens": 123,
"totalCachedTokens": 123,
"cost": {
"inputCost": 123,
"outputCost": 123,
"inputCachedCost": 123,
"inputCacheWriteCost": 123,
"outputCachedCost": 123,
"reasoningOutputCost": 123,
"totalCost": 123
},
"secondaryCost": 123,
"secondaryInputTokens": 123,
"secondaryOutputTokens": 123,
"secondaryByOperation": {},
"pricingTimestamp": 123
},
"metadata": {},
"tenantId": "tenant_12345",
"tags": [
"support",
"onboarding"
],
"stopReason": "max_chat_messages_reached",
"triggerSource": {},
"guardrailResults": {},
"handedOff": true,
"handedOffSubThreadId": "64f5a5b8c123456789abcdef",
"pausedUntil": 123,
"pausedReason": "<string>",
"recalledMemories": [
{}
],
"coreMemories": [
{}
],
"compactions": [
{}
],
"reasoningEffort": "none",
"effectiveReasoningEffort": "none"
}Authorizations
An API key from your Devic console, sent as Authorization: Bearer <key>. An embedded front end sends a tenant-session token instead, so no API key reaches the browser, and an OAuth integration sends its access token. Missing, invalid or expired credentials get a 401. See Authentication.
Path Parameters
Response
The conversation
A conversation with an assistant: its messages and everything the platform recorded about the run — model, tokens, cost, tags and the memory or compaction events it went through.