POST
/
v1
/
video
/
generations
Gemini Omni Flash Preview
curl --request POST \
  --url https://api.novawander.cn/v1/video/generations \
  --header 'Authorization: <authorization>'

简介

通过 NovaWander API 调用 Google gemini-omni-flash-preview 视频生成模型。支持文生视频、单图图生视频,输出含音频的视频;任务为异步提交 + 轮询。另提供 Google Interactions 原生格式兼容路由。
能力支持说明
文生视频✅prompt / input 传文本,内部 text_to_video
图生视频✅文本 + 单张 Base64 图片,内部 image_to_video
视频输出✅返回最终视频地址(含音频)
异步任务✅提交后 GET 轮询
同步阻塞 / SSE❌不支持
视频编辑 / 多图参考❌不支持

认证

Authorization
string
必填
Bearer Token,如 Bearer sk-xxxxxxxxxxxxxxxx
Base URL:https://api.novawander.cn

模型与接口总览

模型 ID类型文生视频图生视频输出任务方式
gemini-omni-flash-previewGemini Omni Flash Preview✅✅ 单图视频(含音频)异步提交 + 轮询
接口方法用途
/v1/video/generationsPOST平台视频格式提交任务
/v1/video/generations/{task_id}GET平台视频格式查询任务
/v1beta/interactionsPOSTGoogle Interactions 格式提交任务
/v1beta/interactions/{interaction_id}GETGoogle Interactions 格式查询任务
/v1beta 兼容接口最终仍走平台视频任务管线,不会改变其他模型的路由行为。

平台视频接口

提交视频任务

POST https://api.novawander.cn/v1/video/generations
{
  "model": "gemini-omni-flash-preview",
  "prompt": "生成一只正在草地上吃草的小羊",
  "width": 1280,
  "height": 720,
  "duration": 3,
  "seed": -1,
  "metadata": {
    "seconds": 3,
    "resolution": "720p",
    "aspectRatio": "16:9",
    "durationSeconds": 3,
    "watermark": false,
    "camera_fixed": false
  }
}
prompt 为必填。Gemini Omni 主要使用以下字段:
字段类型说明
modelstring固定为 gemini-omni-flash-preview
promptstring文本提示词,必填
metadata.resolutionstring当前推荐 720p
metadata.aspectRatiostring16:9 或 9:16
metadata.durationSecondsnumber建议 3–10 秒,实际受上游限制
metadata.imagestring图生视频时传图片 Data URL
提交成功响应:
{
  "code": "success",
  "message": "",
  "data": {
    "id": "video-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "object": "video",
    "model": "gemini-omni-flash-preview",
    "status": "in_progress",
    "progress": 0
  }
}

轮询任务

GET https://api.novawander.cn/v1/video/generations/{task_id}
轮询直到成功或失败:
{
  "code": "success",
  "message": "",
  "data": {
    "id": "video-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "object": "video",
    "model": "gemini-omni-flash-preview",
    "status": "completed",
    "progress": 100,
    "url": "https://your-oss-host/video/xxxxxxxx.mp4"
  }
}
任务可能处于 in_progress。若上游仍在生成,平台保留任务并由后台继续轮询;若上游失败,返回失败原因。不要把 unknown 当作最终成功。 统一入口说明亦见 提交视频任务 与 查询视频任务。

Google Interactions 格式兼容接口

仅改变外部请求/响应形状,内部仍复用平台视频任务、轮询、结果交付与计费链路。

提交与查询

POST https://api.novawander.cn/v1beta/interactions
GET  https://api.novawander.cn/v1beta/interactions/{interaction_id}

文生视频示例

curl -X POST "https://api.novawander.cn/v1beta/interactions" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": "生成一只正在草地上吃草的小羊",
    "generation_config": {
      "video_config": {
        "task": "text_to_video"
      }
    },
    "response_format": {
      "type": "video",
      "aspect_ratio": "16:9",
      "duration": "3s"
    },
    "background": true
  }'
提交返回:
{
  "id": "video-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "object": "interaction",
  "model": "gemini-omni-flash-preview",
  "status": "in_progress"
}

轮询示例

curl "https://api.novawander.cn/v1beta/interactions/video-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"
完成后:
{
  "id": "video-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "object": "interaction",
  "model": "gemini-omni-flash-preview",
  "status": "completed",
  "steps": [
    {
      "type": "video",
      "content": [
        {
          "type": "video",
          "uri": "https://your-oss-host/video/xxxxxxxx.mp4"
        }
      ]
    }
  ]
}

图生视频

兼容路由支持 input 数组中的文本与单张图片 Data URL:
{
  "model": "gemini-omni-flash-preview",
  "input": [
    {
      "type": "text",
      "text": "让这张图片中的小羊在草地上慢慢走动"
    },
    {
      "type": "image",
      "mime_type": "image/png",
      "data": "iVBORw0KGgoAAAANSUhEUg..."
    }
  ],
  "generation_config": {
    "video_config": {
      "task": "image_to_video"
    }
  },
  "response_format": {
    "type": "video",
    "aspect_ratio": "16:9",
    "duration": "3s"
  },
  "background": true
}
平台会将图片转为内部视频任务输入,并沿用现有渠道选择、任务持久化与结果交付。当前兼容适配器不会把 image.uri 直接转为图片输入;需要图片时请传 data。 平台视频接口也可通过 metadata.image(Data URL)做图生视频。

响应与轮询

平台接口与原生兼容接口均为异步:提交只返回任务 ID 与进行中状态;客户端按 ID 轮询直至完成或失败。 状态映射:
平台任务状态原生兼容状态说明
NOT_START / IN_PROGRESSin_progress继续轮询
SUCCESScompleted可读视频地址
FAILUREfailed读错误信息并结束轮询

计费与用量

Google 官方 Gemini Omni 价格:输入 1.50/1Mtokens,文本输出(回答与推理)1.50 / 1M tokens,文本输出(回答与推理)9 / 1M tokens,视频输出 0.10/秒;官方同时给出720p、含音频视频输出按0.10 / 秒;官方同时给出 720p、含音频视频输出按 17.50 / 1M 视频输出 tokens 的等价口径。官方价格页
上游字段平台含义平台计费
total_input_tokens 或 input_tokens_by_modality输入 token输入 $1.50 / 1M
total_thought_tokens、文本输出模态文本回答与推理 token文本输出 $9 / 1M
output_tokens_by_modality[modality=video]视频输出 token视频输出 $17.50 / 1M
total_tokens上游总用量记录用于审计,不直接替代三类计费拆分