{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CreateCompletionRequest",
  "type": "object",
  "description": "Request body for creating a text completion.",
  "properties": {
    "prompt": {
      "type": "string",
      "description": "The prompt(s) to generate completions for."
    },
    "max_tokens": {
      "type": "integer",
      "description": "The maximum number of tokens that can be generated."
    },
    "temperature": {
      "type": "number",
      "description": "Sampling temperature to use."
    },
    "top_p": {
      "type": "number",
      "description": "Nucleus sampling parameter."
    },
    "n": {
      "type": "integer",
      "description": "How many completions to generate for each prompt."
    },
    "stream": {
      "type": "boolean",
      "description": "Whether to stream back partial progress."
    },
    "stop": {
      "type": "string",
      "description": "Up to 4 sequences where the API will stop generating further tokens."
    },
    "presence_penalty": {
      "type": "number",
      "description": "Penalizes new tokens based on whether they appear in the text so far."
    },
    "frequency_penalty": {
      "type": "number",
      "description": "Penalizes new tokens based on their existing frequency in the text."
    },
    "user": {
      "type": "string",
      "description": "A unique identifier representing your end-user."
    }
  }
}