curl --request GET \
--url https://api.mixpeek.com/v1/organizations/billing/usage/breakdown \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mixpeek.com/v1/organizations/billing/usage/breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mixpeek.com/v1/organizations/billing/usage/breakdown', 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.mixpeek.com/v1/organizations/billing/usage/breakdown",
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.mixpeek.com/v1/organizations/billing/usage/breakdown"
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.mixpeek.com/v1/organizations/billing/usage/breakdown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/organizations/billing/usage/breakdown")
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{
"billing_month": "2025-12",
"total_credits": 23450,
"total_cost_usd": 23.45,
"by_operation": {
"batch": 2450,
"extractor": 15000,
"search": 1000,
"upload": 5000
},
"by_extractor": {
"multimodal_extractor": 10000,
"text_extractor": 5000
},
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"by_namespace": {
"ns_clientA": 18000,
"ns_clientB": 5450
},
"by_retriever": {
"ret_search_prod": 4200,
"ret_support_bot": 900
},
"pending_credits": 0.014,
"pending_by_operation": {
"mvs_query": 0.004,
"mvs_write": 0.01
}
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Get Usage Breakdown
Get detailed usage breakdown.
Returns usage breakdown by operation type and extractor for the specified billing period.
Query Parameters:
billing_month: Month to query (YYYY-MM format, defaults to current)
Requirements:
- Read permission
Example:
# Current month
response = await client.get("/v1/organizations/billing/usage/breakdown")
# Specific month
response = await client.get(
"/v1/organizations/billing/usage/breakdown",
params={"billing_month": "2025-11"}
)
curl --request GET \
--url https://api.mixpeek.com/v1/organizations/billing/usage/breakdown \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mixpeek.com/v1/organizations/billing/usage/breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mixpeek.com/v1/organizations/billing/usage/breakdown', 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.mixpeek.com/v1/organizations/billing/usage/breakdown",
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.mixpeek.com/v1/organizations/billing/usage/breakdown"
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.mixpeek.com/v1/organizations/billing/usage/breakdown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/organizations/billing/usage/breakdown")
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{
"billing_month": "2025-12",
"total_credits": 23450,
"total_cost_usd": 23.45,
"by_operation": {
"batch": 2450,
"extractor": 15000,
"search": 1000,
"upload": 5000
},
"by_extractor": {
"multimodal_extractor": 10000,
"text_extractor": 5000
},
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"by_namespace": {
"ns_clientA": 18000,
"ns_clientB": 5450
},
"by_retriever": {
"ret_search_prod": 4200,
"ret_support_bot": 900
},
"pending_credits": 0.014,
"pending_by_operation": {
"mvs_query": 0.004,
"mvs_write": 0.01
}
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Authorizations
Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.
Query Parameters
Billing month in YYYY-MM format (defaults to current month)
"2025-12"
Response
Successful Response
Response with detailed usage breakdown.
Billing month (YYYY-MM)
"2025-12"
Total credits consumed
23450
Total cost in USD
23.45
Credits consumed by operation type
Show child attributes
Show child attributes
{
"batch": 2450,
"extractor": 15000,
"search": 1000,
"upload": 5000
}
Credits consumed by extractor
Show child attributes
Show child attributes
{
"multimodal_extractor": 10000,
"text_extractor": 5000
}
Start of billing period
End of billing period
Credits consumed by namespace (chargeback / cost-allocation for multi-namespace orgs). Keyed by namespace_id; excludes namespace-less consumption. Empty for older usage recorded before per-namespace attribution.
Show child attributes
Show child attributes
{ "ns_clientA": 18000, "ns_clientB": 5450 }
Credits consumed by retriever (per-product query-cost attribution for chargeback). Keyed by retriever_id (resource_type='retriever' charges: queries, enrichment). Empty when no retriever-attributed usage.
Show child attributes
Show child attributes
{
"ret_search_prod": 4200,
"ret_support_bot": 900
}
Unflushed sub-credit usage accrued but not yet committed to by_operation. Micro-priced per-op usage (e.g. MVS writes/queries at ~0.001 credit each) accumulates here and rolls into by_operation in whole credits as it crosses 1 — so real activity is visible immediately, before a whole credit accrues.
0.014
Unflushed fractional credits by operation type.
Show child attributes
Show child attributes
{ "mvs_query": 0.004, "mvs_write": 0.01 }
Was this page helpful?

