curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs', 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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs",
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs"
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs")
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{
"attempts": [
{
"attempt_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"catalog_version": "example",
"charge": {
"adjustments": [
{
"adjustment_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"created_at": "2026-02-18T09:30:00.000Z",
"created_by": "example",
"kind": "provider_authority",
"model_cost_usd": "example",
"reason": "example"
}
],
"charge_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"completeness": "complete",
"components": [
{
"cache_state": "none",
"category": "input",
"component_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"dimension": "example",
"modality": "text",
"model_cost_usd": "example",
"price": {
"catalog_version": "example",
"currency": "USD",
"denominator_units": "example",
"model": "example",
"numerator_nano_usd": "example",
"provider": "example",
"region": "example",
"rule_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"service_tier": "example"
},
"price_redacted": true,
"quantity": "example",
"unit": "token"
}
],
"locally_priced_model_cost_usd": "example",
"model_cost_usd": "example",
"original_model_cost_usd": "example",
"provider_reported_model_cost_usd": "example",
"receipt": {
"provider_request_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"quantities": [
{
"cache_state": "none",
"category": "input",
"dimension": "example",
"modality": "text",
"quantity": "example",
"unit": "token"
}
],
"recovery": {
"method": "example",
"recovered_at": "2026-02-18T09:30:00.000Z",
"reference": "example"
},
"redacted_fields": [
"example"
],
"region": "example",
"requested_model_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"resolved_model_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"service_tier": "example",
"source": "example"
},
"receipt_sha256": "example",
"recorded_at": "2026-02-18T09:30:00.000Z"
},
"completeness": "complete",
"created_at": "2026-02-18T09:30:00.000Z",
"kind": "model",
"model": "example",
"model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"parent_session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"provider": "example",
"root_session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"session_path": "example",
"state": "prepared",
"thread_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"updated_at": "2026-02-18T09:30:00.000Z"
}
],
"model_cost_snapshot_token": "example",
"next_page_token": "example",
"read_timestamp": "2026-02-18T09:30:00.000Z",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"summaries": {
"self": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
},
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"subtree": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
},
"tree": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
}
},
"summary": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "forbidden",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {}
}Page exact model-cost attempts and charges for a session scope
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs', 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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs",
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs"
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/costs")
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{
"attempts": [
{
"attempt_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"catalog_version": "example",
"charge": {
"adjustments": [
{
"adjustment_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"created_at": "2026-02-18T09:30:00.000Z",
"created_by": "example",
"kind": "provider_authority",
"model_cost_usd": "example",
"reason": "example"
}
],
"charge_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"completeness": "complete",
"components": [
{
"cache_state": "none",
"category": "input",
"component_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"dimension": "example",
"modality": "text",
"model_cost_usd": "example",
"price": {
"catalog_version": "example",
"currency": "USD",
"denominator_units": "example",
"model": "example",
"numerator_nano_usd": "example",
"provider": "example",
"region": "example",
"rule_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"service_tier": "example"
},
"price_redacted": true,
"quantity": "example",
"unit": "token"
}
],
"locally_priced_model_cost_usd": "example",
"model_cost_usd": "example",
"original_model_cost_usd": "example",
"provider_reported_model_cost_usd": "example",
"receipt": {
"provider_request_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"quantities": [
{
"cache_state": "none",
"category": "input",
"dimension": "example",
"modality": "text",
"quantity": "example",
"unit": "token"
}
],
"recovery": {
"method": "example",
"recovered_at": "2026-02-18T09:30:00.000Z",
"reference": "example"
},
"redacted_fields": [
"example"
],
"region": "example",
"requested_model_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"resolved_model_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"service_tier": "example",
"source": "example"
},
"receipt_sha256": "example",
"recorded_at": "2026-02-18T09:30:00.000Z"
},
"completeness": "complete",
"created_at": "2026-02-18T09:30:00.000Z",
"kind": "model",
"model": "example",
"model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"parent_session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"provider": "example",
"root_session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"session_path": "example",
"state": "prepared",
"thread_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"updated_at": "2026-02-18T09:30:00.000Z"
}
],
"model_cost_snapshot_token": "example",
"next_page_token": "example",
"read_timestamp": "2026-02-18T09:30:00.000Z",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"summaries": {
"self": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
},
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"subtree": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
},
"tree": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
}
},
"summary": {
"adjustment_count": "example",
"attempt_count": "example",
"charge_count": "example",
"completeness": "complete",
"model_cost_usd": "example",
"scope": "self",
"session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "forbidden",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {}
}{
"code": "analytics",
"message": "<string>",
"details": {}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {}
}Authorizations
A Recursion API key, created in the console under API keys.
Path Parameters
Session id (UUID) the cost read is scoped to. Any id in the tree; scope decides how far the read reaches from it.
Query Parameters
self selects only this session; subtree selects this session and descendants; tree selects the complete root tree.
self, subtree, tree 1 <= x <= 100Signed, organization/session/scope/limit/snapshot-bound continuation token.
Signed token returned by a model-cost detail page. Pins this companion read to the exact same organization/session/scope snapshot.
Response
One page of model-cost attempts for a session scope, together with the rollups for the same pinned snapshot, so a page and its totals cannot disagree. Continuation pages and companion hierarchy reads stay on that snapshot rather than re-reading a moving ledger.
One page of model-cost attempts for a session scope, together with the rollups for the same pinned snapshot, so a page and its totals cannot disagree. Continuation pages and companion hierarchy reads stay on that snapshot rather than re-reading a moving ledger.
Attempts in scope, oldest first by reservation time, up to the requested limit.
Show child attributes
Show child attributes
Signed organization/session/scope-bound token that pins companion model-cost reads to this exact snapshot.
RFC 3339 timestamp of the database snapshot every figure on this page was read from.
How far the read reached from that session: this session alone (self), this session and its descendants (subtree), or every session under the same root (tree).
self, subtree, tree Session the read was scoped to (UUID).
Self, subtree, and tree totals from the same pinned snapshot as this attempt page.
Show child attributes
Show child attributes
{ "self": { "adjustment_count": "example", "attempt_count": "example", "charge_count": "example", "completeness": "complete", "model_cost_usd": "example", "scope": "self", "session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d" }, "session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d", "subtree": { "adjustment_count": "example", "attempt_count": "example", "charge_count": "example", "completeness": "complete", "model_cost_usd": "example", "scope": "self", "session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d" }, "tree": { "adjustment_count": "example", "attempt_count": "example", "charge_count": "example", "completeness": "complete", "model_cost_usd": "example", "scope": "self", "session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d" } }
Rollup for the requested scope, from the same pinned snapshot as this attempt page.
Show child attributes
Show child attributes
{ "adjustment_count": "example", "attempt_count": "example", "charge_count": "example", "completeness": "complete", "model_cost_usd": "example", "scope": "self", "session_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d" }
Continuation for the next page, passed back as page_token. Absent on the last page. It is bound to this organization, session, scope, limit, and snapshot, so it cannot be replayed against a different read.