curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/analytics/consumption/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2026-01-01T00:00:00Z",
"endDate": "2026-01-15T00:00:00Z",
"filter": {
"agents": [
"<string>"
],
"users": [
"<string>"
],
"api_keys": [
"<string>"
],
"groups": [
"<string>"
],
"models": [
"<string>"
],
"tools": [
"<string>"
],
"skills": [
"<string>"
],
"sources": [
"<string>"
],
"tags": [
"<string>"
]
}
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/analytics/consumption/export"
payload = {
"startDate": "2026-01-01T00:00:00Z",
"endDate": "2026-01-15T00:00:00Z",
"filter": {
"agents": ["<string>"],
"users": ["<string>"],
"api_keys": ["<string>"],
"groups": ["<string>"],
"models": ["<string>"],
"tools": ["<string>"],
"skills": ["<string>"],
"sources": ["<string>"],
"tags": ["<string>"]
}
}
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({
startDate: '2026-01-01T00:00:00Z',
endDate: '2026-01-15T00:00:00Z',
filter: {
agents: ['<string>'],
users: ['<string>'],
api_keys: ['<string>'],
groups: ['<string>'],
models: ['<string>'],
tools: ['<string>'],
skills: ['<string>'],
sources: ['<string>'],
tags: ['<string>']
}
})
};
fetch('https://dust.tt/api/v1/w/{wId}/analytics/consumption/export', 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://dust.tt/api/v1/w/{wId}/analytics/consumption/export",
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([
'startDate' => '2026-01-01T00:00:00Z',
'endDate' => '2026-01-15T00:00:00Z',
'filter' => [
'agents' => [
'<string>'
],
'users' => [
'<string>'
],
'api_keys' => [
'<string>'
],
'groups' => [
'<string>'
],
'models' => [
'<string>'
],
'tools' => [
'<string>'
],
'skills' => [
'<string>'
],
'sources' => [
'<string>'
],
'tags' => [
'<string>'
]
]
]),
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://dust.tt/api/v1/w/{wId}/analytics/consumption/export"
payload := strings.NewReader("{\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\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://dust.tt/api/v1/w/{wId}/analytics/consumption/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/analytics/consumption/export")
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 \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body<string>Export consumption analytics
Export per-call consumption analytics for the workspace identified by . Each row represents one unit of billed credit consumption (an LLM call, a tool call, a Frame App charge or an inference hook charge). Frame App charge rows leave the agent and message columns empty, and fill the user columns with the user the charge is billed to, empty for workspace pool charges. Inference hook charge rows fill the agent, message and conversation columns from the Guardrails request of the hook, leave the message and conversation columns empty when that message no longer exists, and leave the user and space columns empty. The export can be filtered by various dimensions (agents, users, API keys, groups, models, tools, skills, sources, tags). The export is limited to a maximum of 30 days per request and times out after 10 seconds: reduce the time range or apply filters to reduce the number of rows if you encounter a timeout. Results are streamed, if an error occurs, an error message is appended and the stream is closed.
An admin API key can export the whole workspace. Any other API key must filter on groups, and
must be allowed to read the analytics of every group listed. The rows then cover the messages of
the users who were members of those groups when the message was sent, and the userGroupIds
and userGroupNames columns only list the requested groups. Frame App and inference hook charges are not
indexed with a message, so a groups filtered export never includes them.
curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/analytics/consumption/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2026-01-01T00:00:00Z",
"endDate": "2026-01-15T00:00:00Z",
"filter": {
"agents": [
"<string>"
],
"users": [
"<string>"
],
"api_keys": [
"<string>"
],
"groups": [
"<string>"
],
"models": [
"<string>"
],
"tools": [
"<string>"
],
"skills": [
"<string>"
],
"sources": [
"<string>"
],
"tags": [
"<string>"
]
}
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/analytics/consumption/export"
payload = {
"startDate": "2026-01-01T00:00:00Z",
"endDate": "2026-01-15T00:00:00Z",
"filter": {
"agents": ["<string>"],
"users": ["<string>"],
"api_keys": ["<string>"],
"groups": ["<string>"],
"models": ["<string>"],
"tools": ["<string>"],
"skills": ["<string>"],
"sources": ["<string>"],
"tags": ["<string>"]
}
}
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({
startDate: '2026-01-01T00:00:00Z',
endDate: '2026-01-15T00:00:00Z',
filter: {
agents: ['<string>'],
users: ['<string>'],
api_keys: ['<string>'],
groups: ['<string>'],
models: ['<string>'],
tools: ['<string>'],
skills: ['<string>'],
sources: ['<string>'],
tags: ['<string>']
}
})
};
fetch('https://dust.tt/api/v1/w/{wId}/analytics/consumption/export', 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://dust.tt/api/v1/w/{wId}/analytics/consumption/export",
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([
'startDate' => '2026-01-01T00:00:00Z',
'endDate' => '2026-01-15T00:00:00Z',
'filter' => [
'agents' => [
'<string>'
],
'users' => [
'<string>'
],
'api_keys' => [
'<string>'
],
'groups' => [
'<string>'
],
'models' => [
'<string>'
],
'tools' => [
'<string>'
],
'skills' => [
'<string>'
],
'sources' => [
'<string>'
],
'tags' => [
'<string>'
]
]
]),
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://dust.tt/api/v1/w/{wId}/analytics/consumption/export"
payload := strings.NewReader("{\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\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://dust.tt/api/v1/w/{wId}/analytics/consumption/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/analytics/consumption/export")
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 \"startDate\": \"2026-01-01T00:00:00Z\",\n \"endDate\": \"2026-01-15T00:00:00Z\",\n \"filter\": {\n \"agents\": [\n \"<string>\"\n ],\n \"users\": [\n \"<string>\"\n ],\n \"api_keys\": [\n \"<string>\"\n ],\n \"groups\": [\n \"<string>\"\n ],\n \"models\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"skills\": [\n \"<string>\"\n ],\n \"sources\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body<string>Body
Response
The consumption data in CSV or NDJSON format
The response is of type string.