Claude Platform Docs

Obter limite de gastos

BetaSpendLimit beta().organization().spendLimits().retrieve(params = SpendLimitRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limits/{spend_limit_id}

Recupere um limite de gastos por ID.

Parameters
SpendLimitRetrieveParams params
Optional<String> spendLimitId⁠Path parameter

ID of the Spend Limit.

Returns
class BetaSpendLimit { type = "spend_limit"; id; amount; /* 6 more */ }

A configured spend limit: a cap on metered spend for one scope and period.

Obter limite de gastos
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.spendlimits.BetaSpendLimit;
import com.anthropic.models.beta.organization.spendlimits.SpendLimitRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        BetaSpendLimit betaSpendLimit = client.beta().organization().spendLimits().retrieve("spend_limit_id");
    }
}
Returns Examples
Response 200
{
  "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"
}