ChatGPT · Schema

ChatCompletionChoice

AgentsAIChatGPTEmbeddingsFine-TuningGPT-4GPT-5Language ModelOpenAIRealtime

Properties

Name Type Description
index integer The index of the choice in the list.
finish_reason string The reason the model stopped generating tokens. stop means the model hit a natural stop point or a provided stop sequence. length means the maximum token limit was reached. tool_calls means the model
logprobs object Log probability information for the choice.
View JSON Schema on GitHub

JSON Schema

chatgpt-chat-completions-chat-completion-choice-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ChatCompletionChoice",
  "type": "object",
  "properties": {
    "index": {
      "type": "integer",
      "description": "The index of the choice in the list."
    },
    "finish_reason": {
      "type": "string",
      "description": "The reason the model stopped generating tokens. stop means\nthe model hit a natural stop point or a provided stop\nsequence. length means the maximum token limit was reached.\ntool_calls means the model called a tool. content_filter\nmeans content was omitted due to a flag from content filters.\n"
    },
    "logprobs": {
      "type": "object",
      "description": "Log probability information for the choice."
    }
  }
}