Appearance
查询视频(OpenAI 风格)
使用 GET /v1/videos/{id} 查询视频任务进度与元数据。
本页提供标准 OpenAI 风格的查询接口调试面板与示例,仅需携带 Bearer Token。
认证
Authorization: Bearer
bash
export BASE_URL="https://aiapi.fhddos.com"
export TOKEN="oh-xxxxxxxxxxxxxxxx"
export VIDEO_ID="video_xxx" # 创建任务后返回的 idcURL 示例
bash
curl "https://aiapi.fhddos.com/v1/videos/$VIDEO_ID" \
-H "Authorization: Bearer $TOKEN"响应字段包含:
status:queued/in_progress/completed/failedprogress:0–100(若上游未提供,可能为 0)video_url或result.video_url:完成后返回的直链(已由网关代理)
INFO
若需要在计费端明确时长,可在查询时追加 ?duration=6 指定秒数。
OpenAPI
yaml
openapi: 3.0.0
info:
title: Gemini Veo Video API
description: Gemini Veo 视频生成 API(OpenAI 风格)
version: 1.0.0
servers:
- url: https://aiapi.fhddos.com
description: Fhddos 生产环境
security:
- BearerAuth: []
paths:
/v1/videos/{video_id}:
get:
tags:
- Veo Videos
summary: 查询视频任务
description: 查询指定视频任务的状态和结果
operationId: getVeoVideo
parameters:
- name: video_id
in: path
required: true
description: 视频任务 ID
schema:
type: string
example: video_abc123
responses:
'200':
description: 查询成功
content:
application/json:
schema:
$ref: '#/components/schemas/VideoObject'
examples:
in_progress:
summary: 生成中
value:
id: video_abc123
object: video
status: in_progress
model: veo-3.1-fast-generate-preview
progress: 45
completed:
summary: 已完成
value:
id: video_abc123
object: video
status: completed
model: veo-3.1-fast-generate-preview
progress: 100
video_url: https://...
seconds: 6
size: 1280x720
'404':
description: 任务不存在
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
VideoObject:
type: object
properties:
id:
type: string
description: 任务 ID
example: video_abc123
object:
type: string
enum:
- video
example: video
created_at:
type: integer
description: 创建时间戳
example: 1761234567
completed_at:
type: integer
description: 完成时间戳
status:
type: string
description: 任务状态
enum:
- queued
- in_progress
- completed
- failed
example: queued
model:
type: string
description: 模型名称
example: veo-3.1-fast-generate-preview
prompt:
type: string
description: 提示词
progress:
type: number
description: 进度(0-100)
example: 0
seconds:
type: integer
description: 视频时长
example: 6
size:
type: string
description: 分辨率
example: 1280x720
video_url:
type: string
description: 视频直链(完成后返回)
error:
$ref: '#/components/schemas/VideoError'
Error:
type: object
properties:
error:
type: object
properties:
message:
type: string
type:
type: string
code:
type: string
VideoError:
type: object
properties:
code:
type: string
message:
type: string
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API Key