Skip to main content
GET
/
v1
/
organizations
/
billing
/
usage
/
current
Get Current Usage
curl --request GET \
  --url https://api.mixpeek.com/v1/organizations/billing/usage/current \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.mixpeek.com/v1/organizations/billing/usage/current"

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/current', 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/current",
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/current"

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/current")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/organizations/billing/usage/current")

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
{
  "current_month_usage": 123,
  "billing_month": "<string>",
  "billing_period_start": "2023-11-07T05:31:56Z",
  "billing_period_end": "2023-11-07T05:31:56Z",
  "estimated_cost_usd": 123,
  "auto_billing_enabled": true,
  "next_invoice_date": "2023-11-07T05:31:56Z",
  "credit_rate": 0.001,
  "plan_usage": {
    "product": "<string>",
    "tier": "<string>",
    "plan_name": "<string>",
    "monthly_minimum_cents": 123,
    "period_start": "2023-11-07T05:31:56Z",
    "period_end": "2023-11-07T05:31:56Z",
    "objects_processed": 41230,
    "object_cap": 100000,
    "vectors_stored": 123,
    "vector_cap": 123,
    "usage_pct": 41.2,
    "cap_state": "ok"
  },
  "usage_v2": {}
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Successful Response

Response with current month usage.

current_month_usage
integer
required

Credits consumed in current billing cycle

Example:

23450

billing_month
string
required

Current billing month (YYYY-MM)

Example:

"2025-12"

billing_period_start
string<date-time>
required

Start of current billing period

billing_period_end
string<date-time>
required

End of current billing period

estimated_cost_usd
number
required

Estimated cost for current usage

Example:

23.45

auto_billing_enabled
boolean
required

Whether auto-billing is enabled

next_invoice_date
string<date-time>
required

When next invoice will be generated

credit_rate
number
default:0.001

Cost per credit in USD

plan_usage
PlanUsage · object | null

Tier usage vs caps (objects for managed, vectors for MVS). None only if plan resolution fails.

usage_v2
Usage V2 · object | null

Modality+features usage for the period (contract v2 §2): dollars by modality and feature, unit counts, estimated flag. SHADOW data until cutover — informational alongside the credit fields above. None if no v2 records exist yet or aggregation fails (best-effort).