Skip to content

API 总览

按模块浏览 HTTP 接口说明,每页包含操作、参数、请求体与响应。

接入流程与最佳实践请见「指南」

V2fun Algorithm API Hub

Task-based multimodal generation and asset-processing APIs.

  • Version: 1.5

模块

任务状态对象

轮询任务状态端点时,响应体将根据任务当前状态返回以下格式之一。

任务已被接受,正在队列中等待处理(status: QUEUED)。由任务创建接口以 HTTP 201 状态码返回。

TaskCreated
task_uuid
required
string(Task Uuid)

Unique identifier for the task

task_type
required
string(Task Type)

Logical task category used by the backend pipeline.

model
required
string(Model)

Model or worker name assigned to the task.

status
required
string(TaskStatus)
Enum: QUEUED PROCESSING COMPLETED FAILED
created_at
required
integer(Created At)

Unix timestamp, in seconds, when the task was created.

queue_position
integer | null[0..∞]

Snapshot position in the model ready queue while the task is still waiting to start. This is not a guaranteed execution order under client-aware dispatching.

estimated_queue_time
number | null[0..∞]

Best-effort estimate of seconds before processing starts, when available.

任务当前正在处理中(status: PROCESSING)。

TaskInProgress
task_uuid
required
string(Task Uuid)

Unique identifier for the task

task_type
required
string(Task Type)

Logical task category used by the backend pipeline.

model
required
string(Model)

Model or worker name assigned to the task.

status
required
string(TaskStatus)
Enum: QUEUED PROCESSING COMPLETED FAILED
created_at
required
integer(Created At)

Unix timestamp, in seconds, when the task was created.

progress
number(Progress)[0..1]

Normalized task progress between 0 and 1.

Default: `0`

任务执行失败(status: FAILED)。result 字段中可能包含失败前的部分输出(如有)。

TaskFailed
task_uuid
required
string(Task Uuid)

Unique identifier for the task

task_type
required
string(Task Type)

Logical task category used by the backend pipeline.

model
required
string(Model)

Model or worker name assigned to the task.

status
required
string(TaskStatus)
Enum: QUEUED PROCESSING COMPLETED FAILED
created_at
required
integer(Created At)

Unix timestamp, in seconds, when the task was created.

failed_at
integer | null

Unix timestamp, in seconds, when the task failed.

result
any(Result)

Task-specific partial output returned before failure, when available.

当任务成功完成(status: COMPLETED)时,响应体将包含各端点对应的具体结果对象(例如 ImageCaptionResponse)。请参阅各接口的 200 响应 Schema。

同步 vs 异步

基于任务的接口支持两种成功状态码:

状态码含义响应体
200任务在请求期间同步完成完整的任务结果
201任务已接受,将在后台异步执行包含 task_uuid 的任务引用对象

对于异步任务,请使用返回的 task_uuid 轮询对应的 GET /{endpoint}/{task_uuid} 端点来获取最终结果。