Endpoint Examples
Chat completion using Groq Endpoint
Sends a request for chat completions. For more details on parameters, visit Groq Cloud.
POST
v1
/
groq
/
chatcompletion
Request Body
messages
array
requiredArray of messages to send to the chat model.
model
string
requiredThe model to use for chat completion.
stream
boolean
Whether to stream the response or not.
200 - Successful chat completion response
id
string
The unique identifier for the chat completion request.
object
string
The type of the object returned, typically ‘chat.completion’.
created
integer
The timestamp of when the chat completion was created.
model
string
The model used for generating the chat completion.
system_fingerprint
string
Fingerprint of the system, if available.
choices
array
The array of completion choices.
usage
object
Usage statistics for the request.
400 - Error response
error
string
The error message explaining what went wrong.
Was this page helpful?