Claude Platform Docs

获取支出限额提额请求

client.Beta.Organization.SpendLimits.IncreaseRequests.Get(ctx, spendLimitIncreaseRequestID) (*BetaSpendLimitIncreaseRequest, error)
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

检索支出限额提额请求。

处于 pending 状态时,响应包含请求者在该请求周期内的实时 spend_summary。

Parameters
spendLimitIncreaseRequestID string⁠Path parameter

ID of the spend limit increase request.

Returns
type BetaSpendLimitIncreaseRequest struct { Type: "spend_limit_increase_request"; ID; Actor; /* 6 more */ }
获取支出限额提额请求
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaSpendLimitIncreaseRequest, err := client.Beta.Organization.SpendLimits.IncreaseRequests.Get(context.TODO(), "spend_limit_increase_request_id")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaSpendLimitIncreaseRequest.ID)
}
Returns Examples
Response 200
{
  "id": "id",
  "actor": {
    "deleted": true,
    "email_address": "email_address",
    "name": "name",
    "type": "user_actor",
    "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "period": "daily",
  "resolved_at": "2019-12-27T18:11:19.117Z",
  "resolved_by": {
    "deleted": true,
    "email_address": "email_address",
    "name": "name",
    "type": "user_actor",
    "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
  },
  "spend_summary": {
    "actor": {
      "deleted": true,
      "email_address": "email_address",
      "name": "name",
      "type": "user_actor",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
    },
    "amount": "50000",
    "currency": "USD",
    "period": "daily",
    "period_to_date_spend": "12050.5",
    "scope": {
      "type": "user",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
    },
    "source": {
      "type": "user",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
    },
    "spend_limit_id": "spend_limit_id"
  },
  "status": "approved",
  "type": "spend_limit_increase_request"
}