Model Requests
curl --request POST \
--url https://api.firebender.com/v2/organization/model-requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"startDate": 1767222900000,
"endDate": 1767226560000,
"email": "user1@firebender.com",
"cursor": "eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==",
"limit": 100
}
'import requests
url = "https://api.firebender.com/v2/organization/model-requests"
payload = {
"startDate": 1767222900000,
"endDate": 1767226560000,
"email": "user1@firebender.com",
"cursor": "eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==",
"limit": 100
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: 1767222900000,
endDate: 1767226560000,
email: 'user1@firebender.com',
cursor: 'eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==',
limit: 100
})
};
fetch('https://api.firebender.com/v2/organization/model-requests', 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.firebender.com/v2/organization/model-requests",
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' => 1767222900000,
'endDate' => 1767226560000,
'email' => 'user1@firebender.com',
'cursor' => 'eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==',
'limit' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.firebender.com/v2/organization/model-requests"
payload := strings.NewReader("{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.firebender.com/v2/organization/model-requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firebender.com/v2/organization/model-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"requestId": "0f8fad5b-d9cb-469f-a165-70867728950e",
"timestamp": "2026-01-01T00:15:00Z",
"email": "user1@firebender.com",
"model": "gpt-5.4",
"inputTokens": 120,
"cacheReadTokens": 25,
"outputTokens": 30,
"cacheWriteTokens": 5,
"totalTokens": 180,
"costUsd": 1.2345,
"spendType": "on-demand",
"mode": "write"
}
],
"nextCursor": null
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}API Reference
Model Requests
Retrieve per-request model usage for your organization
POST
/
v2
/
organization
/
model-requests
Model Requests
curl --request POST \
--url https://api.firebender.com/v2/organization/model-requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"startDate": 1767222900000,
"endDate": 1767226560000,
"email": "user1@firebender.com",
"cursor": "eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==",
"limit": 100
}
'import requests
url = "https://api.firebender.com/v2/organization/model-requests"
payload = {
"startDate": 1767222900000,
"endDate": 1767226560000,
"email": "user1@firebender.com",
"cursor": "eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==",
"limit": 100
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: 1767222900000,
endDate: 1767226560000,
email: 'user1@firebender.com',
cursor: 'eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==',
limit: 100
})
};
fetch('https://api.firebender.com/v2/organization/model-requests', 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.firebender.com/v2/organization/model-requests",
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' => 1767222900000,
'endDate' => 1767226560000,
'email' => 'user1@firebender.com',
'cursor' => 'eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==',
'limit' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.firebender.com/v2/organization/model-requests"
payload := strings.NewReader("{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.firebender.com/v2/organization/model-requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firebender.com/v2/organization/model-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": 1767222900000,\n \"endDate\": 1767226560000,\n \"email\": \"user1@firebender.com\",\n \"cursor\": \"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ==\",\n \"limit\": 100\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"requestId": "0f8fad5b-d9cb-469f-a165-70867728950e",
"timestamp": "2026-01-01T00:15:00Z",
"email": "user1@firebender.com",
"model": "gpt-5.4",
"inputTokens": 120,
"cacheReadTokens": 25,
"outputTokens": 30,
"cacheWriteTokens": 5,
"totalTokens": 180,
"costUsd": 1.2345,
"spendType": "on-demand",
"mode": "write"
}
],
"nextCursor": null
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}{
"error": "Invalid API key"
}Authorizations
apiKeyAuthbearerAuth
Body
application/json
Start of the time window as a Unix timestamp in milliseconds. Data is only available on or after 2025-12-31T00:00:00Z
Example:
1767222900000
End of the time window as a Unix timestamp in milliseconds
Example:
1767226560000
Optional email filter scoped to the organization
Example:
"user1@firebender.com"
Opaque cursor returned by a previous response for pagination
Example:
"eyJjcmVhdGVkQXRNcyI6MTc2NzIyNjUwMDAwMCwiaWQiOiIwZjhmYWQ1Yi1kOWNiLTQ2OWYtYTE2NS03MDg2NzcyODk1MGUifQ=="
Number of rows to return
Required range:
1 <= x <= 500Example:
100
⌘I