列出支出限额
GET/v1/organizations/spend_limits
列出组织的支出限额。
限额按范围类型分组,顺序为 organization、seat_tier、rbac_group、organization_service、user;在同一类型内,它们按固定顺序返回,但该顺序并非创建顺序。仅支持 Claude Enterprise 组织,不支持 Claude Console 组织。
Parameters
Returns
列出支出限额
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.spendlimits.SpendLimitListPage;
import com.anthropic.models.beta.organization.spendlimits.SpendLimitListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
SpendLimitListPage page = client.beta().organization().spendLimits().list();
}
}Response 200
{
"data": [
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page": "next_page"
}