Skip to main content
POST
Chat completion using G4F Endpoint

Request Body

messages
array
required
Array of messages to send to the chat model.
model
string
default:"gpt-4o"
The model could be gpt-40, gpt-3.5-turbo or gpt-4
stream
boolean
Whether to stream the response or not.
timeout
int
timeout for the response to be sent.
shuffle
boolean
default:"false"
Shuffle the providers used for the chat completions. More details here
image_url
string
Include image for vision processing using the google gemini-pro model.

200 - Successful chat completion response

response
string
Response Text.

400 - Error message

error
string
The error message explaining what went wrong.