Endpoint Examples
Chat completion using G4F Endpoint
Sends a request for chat completions using the g4f library
POST
Request Body
Array of messages to send to the chat model.
The model could be gpt-40
, gpt-3.5-turbo
or gpt-4
Whether to stream the response or not.
timeout for the response to be sent.
Shuffle the providers used for the chat completions. More details here
Include image for vision processing using the google gemini-pro model.
200 - Successful chat completion response
Response Text.
400 - Error message
The error message explaining what went wrong.
Was this page helpful?