列出生效的支出限额
GET/v1/organizations/spend_limits/effective
列出每位成员的生效支出限额及本周期至今的支出。
对于成员解析出支出限额的每个(成员,周期)组合返回一行,并附带该支出限额所继承自的 source 范围。按成员分页,因此同一成员的各周期绝不会被拆分到不同页面。仅支持 Claude Enterprise 组织,不支持 Claude Console 组织。
Parameters
Returns
列出生效的支出限额
<?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);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"
}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"
}