API Reference
Chat Completions
Creates a model response for the given chat conversation.
POST
Chat Completions
Authorizations
Headers
Body
application/json
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.
Required range:
0 <= x <= 2Example:
1
The maximum number of tokens to generate in the completion.
If the token count of your prompt (previous messages) plus max_tokens exceed the model's context length, the behavior is depends on context_length_exceeded_behavior. By default, max_tokens will be lowered to fit in the context window instead of returning an error.
Response
OK