Appearance
视频生成(H3 / v2)
MiniMax-H3 v2 视频任务的 OneHub 代理接口
接口范围
MiniMax 官方 H3 v2 能力使用 POST /v2/video_generation 创建任务,并使用 GET /v2/query/video_generation/{task_id} 查询任务。它支持 URL、mm_file 和 data URI 形式的媒体输入,分辨率为 768P 或 2K,时长为 4–15 秒。
OneHub 将该能力代理为以下鉴权接口;两者都必须带 Bearer Token:
| 操作 | OneHub 路径 |
|---|---|
| 创建 | POST /minimaxi/v2/video_generation |
| 查询 | GET /minimaxi/v2/query/video_generation/{task_id} |
http
Authorization: Bearer $TOKENmodel 只能是 MiniMax-H3。minimax-h3-768p-second、 minimax-h3-2k-second 和 minimax-h3-extra-input-image 是 OneHub 内部计费组件 SKU,不能作为 model 值,也不是可配置的模型 allowlist 条目。
创建请求
json
{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "A cat walking on the beach at sunset"}
],
"duration": 5,
"resolution": "768P",
"ratio": "16:9"
}duration必填,范围为 4–15(秒)。resolution可省略(默认768P),只能为768P或2K。content必须恰好有一个非空text项,提示词最多 7000 个 Unicode 字符;text项不能设置role。- 媒体项总数最多 12:
image_url最多一个first_frame、一个last_frame、9 个reference_image;video_url最多 3 个reference_video;audio_url最多 3 个reference_audio。image_url未提供role时会按first_frame处理。 - 首/尾帧模式不能与任何参考素材混用;只有
reference_audio时,必须同时提供reference_image或reference_video。
比例与模式
- 文生视频:没有媒体项时,
ratio必填,且必须是具体比例,不能为adaptive。 - 首/尾帧:包含
first_frame或last_frame时,OneHub 使用adaptive。 - 参考素材:包含任一
reference_*项时,ratio可省略(会使用adaptive), 也可以传adaptive或具体比例。
可用比例为 adaptive、21:9、16:9、4:3、1:1、3:4、9:16;前述模式规则会 进一步限制其可用性。
媒体 locator 与大小限制
每个 image_url.url、video_url.url 和 audio_url.url 只能使用下列 locator:
- 公网
https://URL。OneHub 会对 URL 做 DNS fail-closed 和私网/回环地址拦截; 不接受 HTTP、file:、ftp:、blob:、javascript:或协议相对 URL。 - 严格的
data:<mime>;base64,<payload>。metadata 必须恰为<mime>;base64,不能有 空白字符,payload 必须是非空严格 Base64。 - authority-only 的
mm_file://<positive-int64>。只允许正十进制 int64 authority, 不能包含用户信息、端口、路径、query 或 fragment。
对 data URI,OneHub 会验证解码后单文件大小与 MIME:
| 输入类型 | 允许的 MIME | 解码后上限 |
|---|---|---|
image_url | image/jpeg、image/jpg、image/png、image/webp、image/heic、image/heif | 30 MiB |
video_url | video/mp4 | 50 MiB |
audio_url | audio/wav、audio/mp3 | 15 MiB |
公网 HTTPS URL 和 mm_file 引用不会由 OneHub 拉取或在本地检查媒体内容,媒体格式等 官方约束由上游校验。完整 JSON 请求体最大为 64 MiB;data URI 的 Base64 膨胀和其他 字段也计入该限制,因此实际可用的解码后大小会低于单文件上限。
创建示例
bash
curl -X POST "https://aiapi.fhddos.com/minimaxi/v2/video_generation" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [{"type": "text", "text": "A cat walking on the beach at sunset"}],
"duration": 5,
"resolution": "768P",
"ratio": "16:9"
}'创建成功只返回 OneHub 的稳定公共标识:
json
{
"task_id": "upstream-task-id",
"platform_id": "video_01JSGXXXXXXXXXXXXXXXXXX"
}查询任务
将创建响应的 task_id(或 platform_id)放入路径参数:
bash
curl "https://aiapi.fhddos.com/minimaxi/v2/query/video_generation/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"查询响应保持上游 task 对象,并在顶层附加 platform_id;base_resp 也可能出现。 task 可包含 id、status、model、task_type、resolution、duration、 created_at、updated_at、content.url、usage 和 error。status 与时间字段以 上游实际返回为准。
json
{
"task": {
"id": "upstream-task-id",
"status": "succeeded",
"content": {"url": "https://..."},
"usage": {
"input_seconds": 0,
"output_seconds": 5,
"total_seconds": 5,
"input_image_count": 0
}
},
"platform_id": "video_01JSGXXXXXXXXXXXXXXXXXX",
"base_resp": {"status_code": 0, "status_msg": "success"}
}成功结果中的 task.content.url 是上游签名 URL。它会过期,具体有效期以该 URL 与上游 返回为准;请在收到后及时使用,不要把完整签名 URL 写入日志或长期存储。
本文档不对创建失败、任务失败或取消时的计费结果作额外承诺;计费与额度以 OneHub 账户 和实际任务结算记录为准。
OpenAPI
yaml
openapi: 3.0.3
info:
title: Fhddos Core API
version: '1.0'
description: >-
Core OpenAI-compatible and model-family endpoints used by the Fhddos user
docs.
servers:
- url: https://aiapi.fhddos.com
security:
- BearerAuth: []
paths:
/minimaxi/v2/video_generation:
post:
tags:
- MiniMaxi
summary: Create a MiniMax-H3 v2 video task
description: >-
OneHub proxy for MiniMax H3 v2. Only MiniMax-H3 is accepted. The body is
limited to 64 MiB. Media locators may be public HTTPS URLs, strict data
URIs, or authority-only mm_file references; see the MiniMax H3 v2 guide
for MIME, decoded-size, content-role, count, and ratio constraints.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MiniMaxH3CreateRequest'
responses:
'200':
description: Created task identifiers.
content:
application/json:
schema:
$ref: '#/components/schemas/MiniMaxH3CreateResponse'
security:
- BearerAuth: []
components:
schemas:
MiniMaxH3CreateRequest:
type: object
required:
- model
- content
- duration
properties:
model:
type: string
enum:
- MiniMax-H3
content:
type: array
minItems: 1
maxItems: 13
description: Exactly one text item and at most 12 media items.
items:
$ref: '#/components/schemas/MiniMaxH3ContentItem'
duration:
type: integer
minimum: 4
maximum: 15
description: Output duration in seconds.
resolution:
type: string
default: 768P
enum:
- 768P
- 2K
ratio:
type: string
enum:
- adaptive
- '21:9'
- '16:9'
- '4:3'
- '1:1'
- '3:4'
- '9:16'
description: >-
Required and concrete for text-only generation; adaptive is used for
first/last-frame mode and is the default for reference mode.
callback_url:
type: string
MiniMaxH3CreateResponse:
type: object
required:
- task_id
- platform_id
properties:
task_id:
type: string
description: Upstream task identifier.
platform_id:
type: string
description: OneHub platform task identifier.
MiniMaxH3ContentItem:
oneOf:
- $ref: '#/components/schemas/MiniMaxH3TextContent'
- $ref: '#/components/schemas/MiniMaxH3ImageContent'
- $ref: '#/components/schemas/MiniMaxH3VideoContent'
- $ref: '#/components/schemas/MiniMaxH3AudioContent'
MiniMaxH3TextContent:
type: object
required:
- type
- text
properties:
type:
type: string
enum:
- text
text:
type: string
minLength: 1
maxLength: 7000
description: Exactly one non-empty text item is required in content.
MiniMaxH3ImageContent:
type: object
required:
- type
- image_url
properties:
type:
type: string
enum:
- image_url
image_url:
$ref: '#/components/schemas/MiniMaxH3MediaURL'
role:
type: string
default: first_frame
enum:
- first_frame
- last_frame
- reference_image
MiniMaxH3VideoContent:
type: object
required:
- type
- video_url
- role
properties:
type:
type: string
enum:
- video_url
video_url:
$ref: '#/components/schemas/MiniMaxH3MediaURL'
role:
type: string
enum:
- reference_video
MiniMaxH3AudioContent:
type: object
required:
- type
- audio_url
- role
properties:
type:
type: string
enum:
- audio_url
audio_url:
$ref: '#/components/schemas/MiniMaxH3MediaURL'
role:
type: string
enum:
- reference_audio
MiniMaxH3MediaURL:
type: object
required:
- url
properties:
url:
type: string
description: >-
Public HTTPS URL, strict data:<mime>;base64,<payload>, or
authority-only mm_file://<positive-int64> locator.
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: 'Authorization: Bearer <token>'