Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/completions.ts>CompletionUsage

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
interface CompletionUsage
import { type CompletionUsage } from "https://deno.land/x/openai@v4.41.1/resources/completions.ts";

Usage statistics for the completion request.

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).