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 or a tool call). 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.
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>"Authorizations
Your DUST API key is a Bearer token.
Path Parameters
Unique string identifier for the workspace
Body
Start of the time range (inclusive), ISO 8601 datetime
"2026-01-01T00:00:00Z"
End of the time range (exclusive), ISO 8601 datetime. Must be after startDate, at most 30 days apart.
"2026-01-15T00:00:00Z"
Output format (defaults to csv)
csv, ndjson Optional dimension filters. Each key maps to an array of string identifiers to include. Each value must be at most 256 characters. The total number of values across all dimensions must not exceed 500.
Show child attributes
Show child attributes
Response
The consumption data in CSV or NDJSON format
The response is of type string.