PixMind Docs
API 参考语言模型Gemini 3 7 flash

Gemini 3.7 Flash 对话补全

通过 PixMind API 调用 Gemini 3.7 Flash,完成图像与视频理解和流式多模态输出。

Gemini 3.7 Flash 适合图像分析、视频问答和快速内容理解,并通过 OpenAI 兼容内容块接收多模态输入。

通过 PixMind 兼容 OpenAI 的聊天补全接口调用 Gemini 3.7 Flash。

提供方

Google

模型 ID

gemini-3.7-flash

请求端点

POST /api-platform/v1/chat/completions

模型说明

  • 请将 API Key 保存在服务端;客户端需要增量输出时可启用流式返回。
  • Gemini 每次请求最多接收 10 张图片(每张 10MB)和 1 个视频(20MB);媒体 URL 必须使用 HTTPS。

请求参数

参数类型必填说明
modelstring

稳定的 PixMind 模型 ID,请使用 `gemini-3.7-flash`。

可选值: gemini-3.7-flash

messagesarray

兼容 OpenAI 的对话消息。Gemini 用户消息的 content 可以是字符串,也可以是 text、image_url 和 video_url 内容块数组。

max_tokensinteger

本次请求最多生成的 completion token 数量。

默认值: 4096

temperaturenumber

响应的采样温度。

可选值: 0, 0.5, 1, 2

默认值: 1

streamboolean

启用后逐步流式返回 token。

可选值: true, false

默认值: false

请求示例

cURL
curl https://aihub-admin.aimix.pro/api-platform/v1/chat/completions \
  -H "Authorization: Bearer $PIXMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.7-flash",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Compare the product image with the motion in the video."
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://example.com/product.png"
          }
        },
        {
          "type": "video_url",
          "video_url": {
            "url": "https://example.com/motion.mp4"
          }
        }
      ]
    }
  ],
  "stream": false
}'
JavaScript
const response = await fetch("https://aihub-admin.aimix.pro/api-platform/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.PIXMIND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "gemini-3.7-flash",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Compare the product image with the motion in the video."
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://example.com/product.png"
          }
        },
        {
          "type": "video_url",
          "video_url": {
            "url": "https://example.com/motion.mp4"
          }
        }
      ]
    }
  ],
  "stream": false
})
});

const task = await response.json();

任务受理响应

生成任务为异步处理。请保存 taskId,并轮询 GET /api-platform/v1/tasks/{taskId},直到状态为 ready 或 failed。

200 OK
{
  "code": 1000,
  "data": {
    "id": "img_44160",
    "taskId": 44160,
    "type": "image",
    "model": "gemini-3.7-flash",
    "status": "processing"
  }
}

API 定价

配置价格
输入 Token955.5 credits / 1M tokens
输出 Token4914 credits / 1M tokens
缓存读取109.2 credits / 1M tokens

API 使用 apiPlatform 角色独立计费,与 PixMind Studio 积分分开;任务受理响应中的价格快照是最终计费依据。