시간 경과에 따른 비용 조회
GET/v1/organizations/analytics/cost_report
날짜 범위에 걸친 시간 경과에 따른 USD 비용을 조회합니다.
분, 시간 또는 일 단위 버킷으로 비용을 반환하며, 선택적으로 제품, 모델,
컨텍스트 윈도우, 추론 리전, 속도, 비용 유형 또는 토큰 유형별로 나눌 수 있습니다.
Claude Enterprise 플랜을 사용하는 조직에서 사용할 수 있습니다.
read:analytics 범위가 있는 API 키가 필요합니다.
Parameters
Returns
시간 경과에 따른 비용 조회
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.analytics.costreport.CostReportListPage;
import com.anthropic.models.beta.organization.analytics.costreport.CostReportListParams;
import java.time.OffsetDateTime;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
CostReportListParams params = CostReportListParams.builder()
.startingAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build();
CostReportListPage page = client.beta().organization().analytics().costReport().list(params);
}
}Response 200
{
"data": [
{
"ending_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"amount": "amount",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"inference_geo": "global",
"list_amount": "list_amount",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 0,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"starting_at": "2019-12-27T18:11:19.117Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Returns Examples
Response 200
{
"data": [
{
"ending_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"amount": "amount",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"inference_geo": "global",
"list_amount": "list_amount",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 0,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"starting_at": "2019-12-27T18:11:19.117Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}