---
updatedAt: 2026-08-06T09:58:59.000Z
---

# Creates a model response for the given chat conversation.

Given a list of messages comprising a conversation, the model will return a response. Compatible with OpenAI. See https://platform.openai.com/docs/api-reference/chat/create

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "NVIDIA NIM API for openai/gpt-oss-20b",
    "description": "The NVIDIA NIM REST API. Please see https://docs.api.nvidia.com/nim/reference/openai-gpt-oss-20b for more details.",
    "version": "1.0.0",
    "termsOfService": "https://www.nvidia.com/en-us/data-center/products/nvidia-ai-enterprise/eula/",
    "contact": {
      "name": "NVIDIA Enterprise Support",
      "url": "https://www.nvidia.com/en-us/support/enterprise/"
    },
    "license": {
      "name": "MIT License",
      "url": "https://huggingface.co/openai/gpt-oss-20b/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://integrate.api.nvidia.com/v1/"
    }
  ],
  "paths": {
    "/chat/completions": {
      "post": {
        "operationId": "create_chat_completion_v1_chat_completions_post",
        "tags": [
          "Chat"
        ],
        "summary": "Creates a model response for the given chat conversation.",
        "description": "Given a list of messages comprising a conversation, the model will return a response. Compatible with OpenAI. See https://platform.openai.com/docs/api-reference/chat/create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invocation is fulfilled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletion"
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionChunk"
                }
              }
            }
          },
          "202": {
            "description": "Result is pending. Client should poll using the requestId.\n",
            "content": {
              "application/json": {
                "example": {},
                "schema": {}
              }
            },
            "headers": {
              "NVCF-REQID": {
                "description": "requestId required for pooling",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "NVCF-STATUS": {
                "description": "Invocation status",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed, provided entity could not be processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "example": {
                  "type": "urn:nvcf-worker-service:problem-details:unprocessable-entity",
                  "title": "Unprocessable Entity",
                  "status": 422,
                  "detail": "string",
                  "instance": "/v2/nvcf/pexec/functions/4a58c6cb-a9b4-4014-99de-3e704d4ae687",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                }
              }
            }
          },
          "500": {
            "description": "The invocation ended with an error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "example": {
                  "type": "urn:nvcf-worker-service:problem-details:internal-server-error",
                  "title": "Internal Server Error",
                  "status": 500,
                  "detail": "string",
                  "instance": "/v2/nvcf/pexec/functions/4a58c6cb-a9b4-4014-99de-3e704d4ae687",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                }
              }
            }
          }
        },
        "x-nvai-meta": {
          "name": "Create chat completion",
          "returns": "Returns a [chat completion](/docs/api-reference/chat/object) object, or a streamed sequence of [chat completion chunk](/docs/api-reference/chat/streaming) objects if the request is streamed.\n",
          "path": "create",
          "examples": [
            {
              "name": "Which number is larger, 9.11 or 9.8?",
              "requestJson": "{\n      \"model\": \"openai/gpt-oss-20b\",\n      \"messages\": [\n        {\n          \"role\": \"user\",\n          \"content\": \"Which number is larger, 9.11 or 9.8?\"\n        }\n      ],\n      \"reasoning_effort\": \"high\",\n      \"top_p\": 0.7,\n      \"max_tokens\": 4096,\n      \"temperature\": 0.95,\n      \"stream\": true\n}\n",
              "responseJson": "{\n  \"id\": \"id-123\",\n  \"object\": \"chat.completion\",\n  \"created\": 1677652288,\n  \"model\": \"openai/gpt-oss-20b\",\n  \"system_fingerprint\": \"fp_44709d6fcb\",\n  \"choices\": [{\n    \"index\": 0,\n    \"message\": {\n      \"role\": \"assistant\",\n      \"content\": \"The number 9.11 is...\"\n    },\n    \"finish_reason\": \"stop\"\n  }],\n  \"usage\": {\n    \"prompt_tokens\": 9,\n    \"completion_tokens\": 12,\n    \"total_tokens\": 21\n  }\n}\n"
            },
            {
              "name": "How many 'r's are in 'strawberry'?",
              "requestJson": "{\n      \"model\": \"openai/gpt-oss-20b\",\n      \"messages\": [\n        {\n          \"role\": \"user\",\n          \"content\": \"How many 'r's are in 'strawberry'?\"\n        }\n      ],\n      \"reasoning_effort\": \"medium\",\n      \"top_p\": 0.7,\n      \"max_tokens\": 4096,\n      \"temperature\": 0.95,\n      \"stream\": true\n}\n",
              "responseJson": "{\n  \"id\": \"id-123\",\n  \"object\": \"chat.completion\",\n  \"created\": 1677652288,\n  \"model\": \"openai/gpt-oss-20b\",\n  \"system_fingerprint\": \"fp_44709d6fcb\",\n  \"choices\": [{\n    \"index\": 0,\n    \"message\": {\n      \"role\": \"assistant\",\n      \"content\": \"In the word strawberry...\"\n    },\n    \"finish_reason\": \"stop\"\n  }],\n  \"usage\": {\n    \"prompt_tokens\": 9,\n    \"completion_tokens\": 12,\n    \"total_tokens\": 21\n  }\n}\n"
            }
          ],
          "templateGroups": {
            "Chat Completions": [
              {
                "title": "No Streaming",
                "requestEjs": {
                  "python": "from openai import OpenAI\n\nclient = OpenAI(\n  base_url = \"https://integrate.api.nvidia.com/v1\",\n  api_key = \"$NVIDIA_API_KEY\"\n)\n<% if (request.tools) { %>\ncompletion = client.chat.completions.create(\n  model=\"<%- request.model %>\",\n  messages=<%- JSON.stringify(request.messages) %>,\n  temperature=<%- request.temperature %>,\n  top_p=<%- request.top_p %>,\n  max_tokens=<%- request.max_tokens %>,\n  stream=<%- request.stream?.toString()[0].toUpperCase() + request.stream?.toString().slice(1) %>,\n  tools=<%- JSON.stringify(request.tools) %>,\n  <% if (request.tool_choice) { %>tool_choice=<%- JSON.stringify(request.tool_choice) %><% } %>\n)<% } else { %>\ncompletion = client.chat.completions.create(\n  model=\"<%- request.model %>\",\n  messages=<%- JSON.stringify(request.messages) %>,\n  temperature=<%- request.temperature %>,\n  top_p=<%- request.top_p %>,\n  max_tokens=<%- request.max_tokens %>,\n  stream=<%- request.stream?.toString()[0].toUpperCase() + request.stream?.toString().slice(1) %>\n)<% } %>\n<% if (request.stream) { %>\nfor chunk in completion:\n  reasoning = getattr(chunk.choices[0].delta, \"reasoning_content\", None)\n  if reasoning:\n    print(reasoning, end=\"\")\n  if chunk.choices[0].delta.content is not None:\n    print(chunk.choices[0].delta.content, end=\"\")\n<% } else { %>\nreasoning = getattr(completion.choices[0].message, \"reasoning_content\", None)\nif reasoning:\n  print(reasoning)\nprint(completion.choices[0].message.content)\n<% } %>\n",
                  "langChain": "from langchain_nvidia_ai_endpoints import ChatNVIDIA\n\nclient = ChatNVIDIA(\n  model=\"<%- request.model %>\",\n  api_key=\"$NVIDIA_API_KEY\", \n  temperature=<%- request.temperature %>,\n  top_p=<%- request.top_p %>,\n  max_tokens=<%- request.max_tokens %>,\n)\n<% if (request.stream) { %>\nfor chunk in client.stream(<%- JSON.stringify(request.messages) %>):\n  if chunk.additional_kwargs and \"reasoning_content\" in chunk.additional_kwargs:\n    print(chunk.additional_kwargs[\"reasoning_content\"], end=\"\")\n  print(chunk.content, end=\"\")\n<% } else { %>\nresponse = client.invoke(<%- JSON.stringify(request.messages) %>)\nif response.additional_kwargs and \"reasoning_content\" in response.additional_kwargs:\n  print(response.additional_kwargs[\"reasoning_content\"])\nprint(response.content)\n<% } %>\n",
                  "node.js": "import OpenAI from 'openai';\n\nconst openai = new OpenAI({\n  apiKey: '$NVIDIA_API_KEY',\n  baseURL: 'https://integrate.api.nvidia.com/v1',\n})\n <% if (request.tools) { %>\nasync function main() {\n  const completion = await openai.chat.completions.create({\n    model: \"<%- request.model %>\",\n    messages: <%- JSON.stringify(request.messages) %>,\n    temperature: <%- request.temperature %>,\n    top_p: <%- request.top_p %>,\n    max_tokens: <%- request.max_tokens %>,\n    stream: <%- request.stream %>,\n    <% if (request.tools) { %>tools: <%- JSON.stringify(request.tools) %>,<% } %>\n    <% if (request.tool_choice) { %>tool_choice: <%- JSON.stringify(request.tool_choice) %>,<% } %>\n  })<% } else { %>\nasync function main() {\n  const completion = await openai.chat.completions.create({\n    model: \"<%- request.model %>\",\n    messages: <%- JSON.stringify(request.messages) %>,\n    temperature: <%- request.temperature %>,\n    top_p: <%- request.top_p %>,\n    max_tokens: <%- request.max_tokens %>,\n    stream: <%- request.stream %>\n  })<% } %>\n   <% if (request.stream) { %>\n  for await (const chunk of completion) {\n    const reasoning = chunk.choices[0]?.delta?.reasoning_content;\n    if (reasoning) process.stdout.write(reasoning);\n    process.stdout.write(chunk.choices[0]?.delta?.content || '')\n  }\n  <% } else { %>\n  const reasoning = completion.choices[0]?.message?.reasoning_content;\n  if (reasoning) process.stdout.write(reasoning + \"\\n\");\n  process.stdout.write(completion.choices[0]?.message?.content);\n  <% } %>\n}\n\nmain();",
                  "curl": "<% if (request.tools) { %>\n  \"curl https://integrate.api.nvidia.com/v1/chat/completions \\\\\\n\n    -H \\\"Content-Type: application/json\\\" \\\\\\n\n    -H \\\"Authorization: Bearer $NVIDIA_API_KEY\\\" \\\\\\n\n    -d '{\\n\n      \\\"model\\\": \\\"openai/gpt-oss-20b\\\",\\n\n      \\\"messages\\\": <%- JSON.stringify(request.messages).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %>,\\n\n      \\\"temperature\\\": <%- request.temperature %>,\\n\n      \\\"top_p\\\": <%- request.top_p %>,\\n\n      \\\"max_tokens\\\": <%- request.max_tokens %>,\\n\n      \\\"stream\\\": <%- request.stream %>\n      <% if (request.tools) { %>,\\n    \\\"tools\\\": <%- JSON.stringify(request.tools).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %><% } %>\n      <% if (request.tool_choice) { %>,\\n    \\\"tool_choice\\\": <%- JSON.stringify(request.tool_choice).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %><% } %>\n    }'\\n\"<% } else { %>\n  \"curl https://integrate.api.nvidia.com/v1/chat/completions \\\\\\n\n    -H \\\"Content-Type: application/json\\\" \\\\\\n\n    -H \\\"Authorization: Bearer $NVIDIA_API_KEY\\\" \\\\\\n\n    -d '{\\n\n      \\\"model\\\": \\\"openai/gpt-oss-20b\\\",\\n\n      \\\"messages\\\": <%- JSON.stringify(request.messages).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %>,\\n\n      \\\"temperature\\\": <%- request.temperature %>,\\n\n      \\\"top_p\\\": <%- request.top_p %>,\\n\n      \\\"max_tokens\\\": <%- request.max_tokens %>,\\n\n      \\\"stream\\\": <%- request.stream %>\n      <% if (request.tools) { %>,\\n    \\\"tools\\\": <%- JSON.stringify(request.tools).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %><% } %>\n      <% if (request.tool_choice) { %>,\\n    \\\"tool_choice\\\": <%- JSON.stringify(request.tool_choice).replaceAll(\\\"'\\\", \\\"'\\\\\\\"'\\\\\\\"'\\\") %><% } %>\n    }'\\n\"<% } %>"
                }
              }
            ],
            "Responses API": [
              {
                "title": "No Streaming",
                "requestEjs": {
                  "python": "from openai import OpenAI\n\nclient = OpenAI(\n  base_url = \"https://integrate.api.nvidia.com/v1\",\n  api_key = \"$NVIDIA_API_KEY\"\n)\n\nresponse = client.responses.create(\n  model=\"<%- request.model %>\",\n  input=[<%- JSON.stringify(request.messages[request.messages.length - 1].content) %>],\n  max_output_tokens=<%- request.max_tokens %>,\n  top_p=<%- request.top_p %>,\n  temperature=<%- request.temperature %>,\n  stream=<%- request.stream?.toString()[0].toUpperCase() + request.stream?.toString().slice(1) %>\n)\n\n<% if (request.stream) { %>\nfor chunk in response:\n  print(chunk)\n<% } else { %>\nprint(response)\n<% } %>\n",
                  "node.js": "import OpenAI from 'openai';\n\nconst openai = new OpenAI({\n  apiKey: '$NVIDIA_API_KEY',\n  baseURL: 'https://integrate.api.nvidia.com/v1',\n})\n\nasync function main() {\n  const response = await openai.post('/responses', {\n    model: \"<%- request.model %>\",\n    input: <%- JSON.stringify(request.messages) %>,\n    max_output_tokens: <%- request.max_tokens %>,\n    top_p: <%- request.top_p %>,\n    temperature: <%- request.temperature %>,\n    stream: <%- request.stream %>\n  });\n\n  <% if (request.stream) { %>\n  for await (const chunk of response) {\n    // Handle reasoning content streaming\n    if (chunk.type === \"response.reasoning_text.delta\") {\n      process.stdout.write(`[Reasoning] ${chunk.delta}`);\n    } else if (chunk.type === \"response.reasoning_text.done\") {\n      process.stdout.write(`\\n[Reasoning Complete: ${chunk.text}]\\n`);\n    } \n    // Handle regular text content streaming\n    else if (chunk.type === \"response.output_text.delta\") {\n      process.stdout.write(chunk.delta);\n    }\n    // Handle structured delta format\n    else if (chunk.delta && chunk.delta.output) {\n      for (const outputItem of chunk.delta.output) {\n        for (const content of outputItem.content) {\n          if (content.type === \"text\") {\n            process.stdout.write(content.text);\n          }\n        }\n      }\n    }\n  }\n  <% } else { %>\n  for (const outputItem of response.output) {\n    for (const content of outputItem.content) {\n      if (content.type === \"text\") {\n        console.log(content.text);\n      }\n    }\n  }\n  <% } %>\n}\n\nmain();",
                  "curl": "curl https://integrate.api.nvidia.com/v1/responses \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $NVIDIA_API_KEY\" \\\n  -d '{\n    \"model\": \"<%- request.model %>\",\n    \"input\": [<%- JSON.stringify(request.messages[request.messages.length - 1].content).replaceAll(\"'\", \"'\\\"'\\\"'\") %>],\n    \"max_output_tokens\": <%- request.max_tokens %>,\n    \"top_p\": <%- request.top_p %>,\n    \"temperature\": <%- request.temperature %>,\n    \"stream\": <%- request.stream %>\n  }'"
                }
              }
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "Token": []
    }
  ],
  "components": {
    "securitySchemes": {
      "Token": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Errors": {
        "properties": {
          "type": {
            "type": "string",
            "description": "Error type"
          },
          "title": {
            "type": "string",
            "description": "Error title"
          },
          "status": {
            "type": "integer",
            "description": "Error status code"
          },
          "detail": {
            "type": "string",
            "description": "Detailed information about the error"
          },
          "instance": {
            "type": "string",
            "description": "Function instance used to invoke the request"
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the request"
          }
        },
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "requestId"
        ],
        "title": "InvokeError"
      },
      "ChatCompletion": {
        "properties": {
          "id": {
            "description": "A unique identifier for the completion.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "choices": {
            "description": "The list of completion choices the model generated for the input prompt.",
            "items": {
              "$ref": "#/components/schemas/Choice"
            },
            "title": "Choices",
            "type": "array"
          },
          "usage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Usage"
              }
            ],
            "description": "Usage statistics for the completion request."
          }
        },
        "required": [
          "id",
          "choices",
          "usage"
        ],
        "title": "ChatCompletion",
        "type": "object"
      },
      "ChatCompletionChunk": {
        "properties": {
          "id": {
            "description": "A unique identifier for the completion.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "choices": {
            "description": "The list of completion choices the model generated for the input prompt.",
            "items": {
              "$ref": "#/components/schemas/ChoiceChunk"
            },
            "title": "Choices",
            "type": "array"
          }
        },
        "required": [
          "id",
          "choices"
        ],
        "title": "ChatCompletionChunk",
        "type": "object"
      },
      "ChatRequest": {
        "additionalProperties": false,
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "default": "openai/gpt-oss-20b"
          },
          "messages": {
            "description": "A list of messages comprising the conversation so far. The roles of the messages must be alternating between `user` and `assistant`. The last input message should have role `user`. A message with the the `system` role is optional, and must be the very first message if it is present; `context` is also optional, but must come before a user question.",
            "examples": [
              [
                {
                  "content": "I am going to Paris, what should I see?",
                  "role": "user"
                }
              ]
            ],
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "title": "Messages",
            "type": "array"
          },
          "temperature": {
            "default": 0.6,
            "description": "The sampling temperature to use for text generation. The higher the temperature value is, the less deterministic the output text will be. It is not recommended to modify both temperature and top_p in the same call.",
            "maximum": 1,
            "minimum": 0,
            "title": "Temperature",
            "type": "number"
          },
          "top_p": {
            "default": 0.7,
            "description": "The top-p sampling mass used for text generation. The top-p value determines the probability mass that is sampled at sampling time. For example, if top_p = 0.2, only the most likely tokens (summing to 0.2 cumulative probability) will be sampled. It is not recommended to modify both temperature and top_p in the same call.",
            "maximum": 1,
            "exclusiveMinimum": 0,
            "title": "Top P",
            "type": "number"
          },
          "frequency_penalty": {
            "type": "number",
            "maximum": 2,
            "minimum": -2,
            "default": 0,
            "title": "Frequency Penalty",
            "description": "Indicates how much to penalize new tokens based on their existing frequency in the text so far, decreasing model likelihood to repeat the same line verbatim."
          },
          "presence_penalty": {
            "type": "number",
            "maximum": 2,
            "minimum": -2,
            "default": 0,
            "title": "Presence Penalty",
            "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing model likelihood to talk about new topics."
          },
          "max_tokens": {
            "default": 4096,
            "description": "The maximum number of tokens to generate in any given call. Note that the model is not aware of this value, and generation will simply stop at the number of tokens specified.",
            "maximum": 4096,
            "minimum": 1,
            "title": "Max Tokens",
            "type": "integer"
          },
          "stream": {
            "default": false,
            "description": "If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events (SSE) as they become available (JSON responses are prefixed by `data: `), with the stream terminated by a `data: [DONE]` message.",
            "title": "Stream",
            "type": "boolean"
          },
          "stop": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop",
            "description": "A string or a list of strings where the API will stop generating further tokens. The returned text will not contain the stop sequence."
          },
          "reasoning_effort": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "title": "Reasoning Effort",
            "description": "Controls the effort level for reasoning in reasoning-capable models. 'low' provides basic reasoning, 'medium' provides balanced reasoning, and 'high' provides detailed step-by-step reasoning."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "title": "Tools",
            "description": "A list of tools the model may call."
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ]
              }
            ],
            "title": "Tool Choice",
            "description": "Controls which (if any) tool is called by the model."
          }
        },
        "required": [
          "messages"
        ],
        "title": "ChatRequest",
        "type": "object"
      },
      "Choice": {
        "properties": {
          "index": {
            "description": "The index of the choice in the list of choices (always 0).",
            "title": "Index",
            "type": "integer"
          },
          "message": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Message"
              }
            ],
            "description": "A chat completion message generated by the model.",
            "examples": [
              {
                "content": "Ah, Paris, the City of Light! There are so many amazing things to see and do in this beautiful city ...",
                "role": "assistant"
              }
            ]
          },
          "finish_reason": {
            "anyOf": [
              {
                "enum": [
                  "stop",
                  "length"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, or `length` if the maximum number of tokens specified in the request was reached.",
            "examples": [
              "stop"
            ],
            "title": "Finish Reason"
          }
        },
        "required": [
          "index",
          "message"
        ],
        "title": "Choice",
        "type": "object"
      },
      "ChoiceChunk": {
        "properties": {
          "index": {
            "description": "The index of the choice in the list of choices (always 0).",
            "title": "Index",
            "type": "integer"
          },
          "delta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Message"
              }
            ],
            "description": "A chat completion delta generated by streamed model responses.",
            "examples": [
              {
                "content": "Ah,",
                "role": "assistant"
              }
            ]
          },
          "finish_reason": {
            "anyOf": [
              {
                "enum": [
                  "stop",
                  "length"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, or `length` if the maximum number of tokens specified in the request was reached. Will be `null` if the model has not finished generating.",
            "title": "Finish Reason"
          }
        },
        "required": [
          "index",
          "delta"
        ],
        "title": "ChoiceChunk",
        "type": "object"
      },
      "Message": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "description": "The role of the message author.",
            "enum": [
              "user",
              "assistant"
            ],
            "title": "Role",
            "type": "string"
          },
          "content": {
            "description": "The contents of the message.",
            "title": "Content",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "Message",
        "type": "object"
      },
      "Usage": {
        "properties": {
          "completion_tokens": {
            "description": "Number of tokens in the generated completion.",
            "examples": [
              25
            ],
            "title": "Completion Tokens",
            "type": "integer"
          },
          "prompt_tokens": {
            "description": "Number of tokens in the prompt.",
            "examples": [
              9
            ],
            "title": "Prompt Tokens",
            "type": "integer"
          },
          "total_tokens": {
            "description": "Total number of tokens used in the request (prompt + completion).",
            "examples": [
              34
            ],
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "required": [
          "completion_tokens",
          "prompt_tokens",
          "total_tokens"
        ],
        "title": "Usage",
        "type": "object"
      },
      "Tool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "description": "The type of the tool."
          },
          "function": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the function to be called."
              },
              "description": {
                "type": "string",
                "description": "A description of what the function does."
              },
              "parameters": {
                "type": "object",
                "description": "The parameters the function accepts, described as a JSON Schema object."
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "type",
          "function"
        ],
        "title": "Tool",
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```