Skip to main content
MUTATION
collectCcusage(requestId: ID): CcusageCollection!

Arguments

requestId
ID

Identifier of the request.

id
ID!

Stable identifier for this Claude Code usage collection.

Current status of this Claude Code usage collection.

createdAt
String!

ISO 8601 timestamp when this Claude Code usage collection was created.

deadlineAt
String!

ISO 8601 timestamp when this Claude Code usage collection deadline.

finishedAt
String

ISO 8601 timestamp when this Claude Code usage collection finished. May be null when unavailable or not applicable.

The progress associated with this Claude Code usage collection.

hasStoredHistory
Boolean!

Whether durable Claude Code usage history is stored.

The aggregate associated with this Claude Code usage collection.

Arguments
range
default:ALL

The range used to filter or perform the operation. Defaults to ALL.

includeHistory
Boolean
default:true

Whether stored usage history is included. Defaults to true.

endDate
String

The inclusive final calendar date in strict YYYY-MM-DD form. Ignored for ALL.

The highest rolling spend windows across all retained usage matching the non-date filters.

Arguments
includeHistory
Boolean
default:true

Whether stored usage history is included. Defaults to true.

agentId
ID

Identifier of the agent whose usage is included. All agents are included when omitted.

modelName
String

Name of the model whose usage is included. All models are included when omitted.

Mutation
Response