Usage statistics for the completion request.

interface CompletionUsage {
    completion_tokens: number;
    prompt_tokens: number;
    total_tokens: number;
}

Properties

completion_tokens: number

Number of tokens in the generated completion.

prompt_tokens: number

Number of tokens in the prompt.

total_tokens: number

Total number of tokens used in the request (prompt + completion).