ChatGPT · JSON Structure

Chatgpt Chat Completions Completion Usage Structure

Type: object Properties: 5
AgentsAIChatGPTEmbeddingsFine-TuningGPT-4GPT-5Language ModelOpenAIRealtime

CompletionUsage is a JSON Structure definition published by ChatGPT, describing 5 properties. It conforms to the https://json-structure.org/draft/2020-12/schema meta-schema.

Properties

prompt_tokens completion_tokens total_tokens completion_tokens_details prompt_tokens_details

Meta-schema: https://json-structure.org/draft/2020-12/schema

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/draft/2020-12/schema",
  "name": "CompletionUsage",
  "type": "object",
  "properties": {
    "prompt_tokens": {
      "type": "integer"
    },
    "completion_tokens": {
      "type": "integer"
    },
    "total_tokens": {
      "type": "integer"
    },
    "completion_tokens_details": {
      "type": "object"
    },
    "prompt_tokens_details": {
      "type": "object"
    }
  }
}