## Create **post** `/chat/completions` Creates a model response for the given chat conversation. ### Returns - **id:** `string` A unique identifier for the chat completion. - **choices:** `array of object` A list of chat completion choices. Can be more than one if `n` is greater than 1. - **finish\_reason:** `"stop" OR "length" OR "tool_calls"` 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, `tool_calls` if the model called a tool. - `"stop"` - `"length"` - `"tool_calls"` - **index:** `number` The index of the choice in the list of choices. - **logprobs:** `object` Log probability information for the choice. - **content:** `array of ChatCompletionTokenLogprob` A list of message content tokens with log probability information. - **refusal:** `array of ChatCompletionTokenLogprob` A list of message refusal tokens with log probability information. - **message:** `object` A chat completion message generated by the model. - **content:** `string` The contents of the message. - **refusal:** `string` The refusal message generated by the model. - **role:** `"assistant"` The role of the author of this message. - `"assistant"` - **tool\_calls:** `array of object` The tool calls generated by the model, such as function calls. - **id:** `string` The ID of the tool call. - **function:** `object` The function that the model called. - **arguments:** `string` The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - **name:** `string` The name of the function to call. - **type:** `"function"` The type of the tool. Currently, only `function` is supported. - `"function"` - **created:** `number` The Unix timestamp (in seconds) of when the chat completion was created. - **model:** `string` The model used for the chat completion. - **object:** `"chat.completion"` The object type, which is always `chat.completion`. - `"chat.completion"` - **usage:** `CompletionUsage` Usage statistics for the completion request.