Skip to main content

AiUsageLogEntry

One AI call and what it used.

type AiUsageLogEntry {
costCents: String!
createdAt: DateTime!
creditsUsed: String!
creditsUsedDisplay: String!
feature: String
id: ID!
inputTokens: Int!
model: String!
outputTokens: Int!
}

Fields​

AiUsageLogEntry.costCents ● String! non-null scalar​

Raw provider cost in cents (4dp precision as a string), before margin.

AiUsageLogEntry.createdAt ● DateTime! non-null scalar​

When the record was created.

AiUsageLogEntry.creditsUsed ● String! non-null scalar​

Amount actually charged in cents (4dp precision as a string), cost × margin.

AiUsageLogEntry.creditsUsedDisplay ● String! non-null scalar​

Ready-to-render charge, e.g. "USD 0.12" or "< USD 0.01" for a sub-cent call. Formatted here because platform billing is USD by design and the console must hold no money literal (static-literal guard).

AiUsageLogEntry.feature ● String scalar​

The feature that made the call.

AiUsageLogEntry.id ● ID! non-null scalar​

The unique ID of this record.

AiUsageLogEntry.inputTokens ● Int! non-null scalar​

How many input tokens were used.

AiUsageLogEntry.model ● String! non-null scalar​

The model used.

AiUsageLogEntry.outputTokens ● Int! non-null scalar​

How many output tokens were used.

Returned By​

aiCreditUsageHistory query