OpenAI APIs · Schema

CompletionResponse

Artificial IntelligenceEmbeddingsImage GenerationLanguage ModelsSpeech

Properties

Name Type Description
id string A unique identifier for the completion
object string
created integer Unix timestamp of when the completion was created
model string The model used for the completion
choices array
usage object
system_fingerprint string Fingerprint of the backend configuration
View JSON Schema on GitHub

JSON Schema

openai-apis-completionresponse-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CompletionResponse",
  "title": "CompletionResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifier for the completion"
    },
    "object": {
      "type": "string",
      "enum": [
        "text_completion"
      ]
    },
    "created": {
      "type": "integer",
      "description": "Unix timestamp of when the completion was created"
    },
    "model": {
      "type": "string",
      "description": "The model used for the completion"
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The generated text"
          },
          "index": {
            "type": "integer"
          },
          "logprobs": {
            "type": "object",
            "nullable": true
          },
          "finish_reason": {
            "type": "string",
            "enum": [
              "stop",
              "length"
            ]
          }
        }
      }
    },
    "usage": {
      "$ref": "#/components/schemas/Usage"
    },
    "system_fingerprint": {
      "type": "string",
      "description": "Fingerprint of the backend configuration"
    }
  }
}