Claude Platform Docs

Obtenir une limite de dépenses

beta.organization.spend_limits.retrieve(spend_limit_id) -> BetaSpendLimit
GET/v1/organizations/spend_limits/{spend_limit_id}

Récupérer une limite de dépenses par son ID.

Parameters
spend_limit_id: String⁠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.

Obtenir une limite de dépenses
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

beta_spend_limit = anthropic.beta.organization.spend_limits.retrieve("spend_limit_id")

puts(beta_spend_limit)
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"
}