Claude Platform Docs

Effektive Ausgabenlimits auflisten

$client->organization->spendLimits->effective->list(?int limit, ?string page, ?list<SpendLimitPeriod> period, ?list<string> userIDs): PageCursor<SpendSummary>
GET/v1/organizations/spend_limits/effective

Listet für jedes Mitglied das effektive Ausgabenlimit und die bisherigen Ausgaben im Zeitraum auf.

Gibt eine Zeile pro (Mitglied, Zeitraum) zurück, für die das Mitglied ein Ausgabenlimit auflöst, zusammen mit dem source-Bereich, von dem das Ausgabenlimit geerbt wurde. Die Paginierung erfolgt nach Mitglied, sodass die Zeiträume eines Mitglieds nie auf mehrere Seiten verteilt werden. Nur für Claude Enterprise-Organisationen unterstützt, nicht für Claude Console-Organisationen.

Parameters
limit?: optional int⁠Query parameter

Maximum number of members per page. A member's period rows never split across pages, so a page may carry more rows than this. Defaults to 20.

default20
page?: optional string⁠Query parameter

Opaque cursor from a previous response's next_page field.

period?: optional list<SpendLimitPeriod>⁠Query parameter

Restrict the report to these limit periods. Omit to return one row per period each member resolves a spend limit for.

userIDs?: optional list<string>⁠Query parameter

Restrict the report to these members, by tagged user ID (user_...). At most 100 entries.

Returns
class SpendSummary { $actor; $amount; $currency; /* 5 more */ }
Actor actor
?string amount

Effective limit amount as a non-negative integer decimal string in the minor unit of currency (cents for USD). null means no limit applies for this row's period — each period resolves independently, so another period may still cap this member.

string currency

ISO 4217 code of the organization's billing currency; the unit for amount and period_to_date_spend.

Period this row's effective limit and spend are reported for.

string periodToDateSpend

The member's spend so far in the current period, as a non-negative decimal string in the minor unit of currency (cents for USD). May carry fractional minor units up to three decimal places (e.g. "12050.5") — metered usage is not rounded to whole cents. Reads as "0" when the spend reading is temporarily unavailable.

Scope scope
Source source
string spendLimitID
Effektive Ausgabenlimits auflisten
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Organization\SpendLimits\SpendLimitPeriod;

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->organization->spendLimits->effective->list(
  limit: 1, page: 'page', period: [SpendLimitPeriod::DAILY], userIDs: ['string']
);

var_dump($page);
Returns Examples
Response 200
{
  "data": [
    {
      "actor": {
        "deleted": true,
        "email_address": "email_address",
        "name": "name",
        "type": "user_actor",
        "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
      },
      "amount": "50000",
      "currency": "USD",
      "period": "daily",
      "period_to_date_spend": "12050.5",
      "scope": {
        "type": "user",
        "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
      },
      "source": {
        "type": "user",
        "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
      },
      "spend_limit_id": "spend_limit_id"
    }
  ],
  "next_page": "next_page"
}