Chat Completions
Generate AI chat responses based on the input messages. Supports multiple chat models and parameter configurations.
Note: For setting the chat model name, refer to System Supported Chat Model List. The request/response parameter structure is fully compatible with OpenAI. When switching models, you only need to modify the corresponding model name. If the model request/response parameters are inconsistent with OpenAI, GeekAI will automatically convert and align them. Except for Baidu ERNIE Bot and iFlytek Spark, all other platforms support function calling (the specific supported models are subject to platform restrictions). When calling the GPTs model API, you need to replace the * in gpt-4-gizmo-* with the corresponding GPTs’ gizmo_id, which can be obtained by extracting it from the GPTs URL. For example, for https://chatgpt.com/g/g-bo0FiWLY7-researchgpt, the corresponding gizmo_id is g-bo0FiWLY7.
The response data structure is fully compatible with OpenAI and builds upon it to add new features for adapting to other models. It provides support for cited links (citations
), search billing units (billed_units
), video in message content, image/video input tokens, and inference mode settings (thinking
). The response structure changes depending on whether it is a streaming output or not. You can refer to the request examples below to make a judgment:
cURL Request Example
Authorizations
token
Body
Response
Successful response
The response is of type object
.