Usage (Deprecated. Use usageDetails and costDetails instead.) Standard interface for usage and cost

interface ApiUsage {
    input?: null | number;
    inputCost?: null | number;
    output?: null | number;
    outputCost?: null | number;
    total?: null | number;
    totalCost?: null | number;
    unit?: null | ApiModelUsageUnit;
}

Properties

input?: null | number

Number of input units (e.g. tokens)

inputCost?: null | number

USD input cost

double

output?: null | number

Number of output units (e.g. tokens)

outputCost?: null | number

USD output cost

double

total?: null | number

Defaults to input+output if not set

totalCost?: null | number

USD total cost, defaults to input+output

double

unit?: null | ApiModelUsageUnit

Unit of usage in Langfuse