Gengxi API Developer Docs
Chat Completions
向 POST /v1/chat/completions 发送消息、工具和多模态请求。
创建 Chat Completion
bash复制
curl https://api.gengxi.ai/v1/chat/completions \
-H "Authorization: Bearer $GENGXI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL",
"messages": [{"role": "user", "content": "Hello"}]
}'请求字段
常见公开能力包括 model、messages、tools、functions、tool_choice、function_call、reasoning_effort、stream、temperature、top_p、max_tokens、max_completion_tokens、response_format、service_tier 和 parallel_tool_calls。
多模态内容
兼容的 message content 可包含 text、image_url 和 file。具体支持取决于模型与分组。
json复制
{
"role": "user",
"content": [
{"type": "text", "text": "描述这张图。"},
{"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
]
}协议转换
部分请求可能根据目标 provider 转换协议。文档只描述公开契约,不暴露内部调度。