跳转到主要内容
GET
/
v1
/
tasks
/
{task_id}
查询任务状态
curl --request GET \
  --url https://api.foxapi.cc/v1/tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "task-unified-1757165031-uyujaw3d",
  "object": "video.generation.task",
  "type": "video",
  "model": "lipsync-2",
  "status": "pending",
  "progress": 0,
  "created": 1757165031,
  "results": null,
  "error": null,
  "usage": {
    "credits_reserved": 5,
    "user_group": "default"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

results 字段格式说明

任务完成(status=completed)后,results 是一个数组,结构按模型不同而异。解析结果前请先根据响应中的 model 字段判定结构类型。

通用格式(大多数模型)

按任务输出类型(type)分组:
typeresults[i] 结构典型场景
image{url}图片生成、编辑、增强
video{url}视频生成、对口型、视频编辑
audio(TTS / 音乐){url}语音合成、音乐生成
llm完整 OpenAI ChatCompletion{id, object:"chat.completion", created, model, choices[].message, usage}LLM 生成(llm_router / llm_async)
url 有效期均为 24 小时,请尽快保存。

特殊格式(按 model 区分)

以下模型的 results[i] 结构不遵循上表通用格式。调用方必须按 model 单独处理。

档案创建类(不返回媒体 URL)

modeltyperesults[i] 结构说明
kling-video-create-voicevideo{voice_id}创建可复用的语音档案 ID,供后续 Kling 对口型 / 合成任务引用
minimax-voice-cloneaudio{voice_id}MiniMax 声音克隆:提交参考音频生成可复用的声音 ID,供后续 MiniMax TTS 任务引用
sora-2-charactervideo{character_id, name}从参考视频提取角色档案,供后续 Sora 2 任务实现角色一致性
phota-create-profileimage{result_type, profile_id}训练人物档案,供其他 PHOTA 模型引用;result_type 固定为 profile

语音转写类(不返回媒体 URL)

modeltyperesults[i] 结构说明
scribe-v2audio{text, language_code, language_probability, words[]}语音转文本。words[] 为字级时间戳数组,每项含 text / start / end / type

视频带种子值

modeltyperesults[i] 结构说明
seedance-2.0-text-to-videovideo{url, seed}额外返回生成种子,用于复现
seedance-2.0-fast-text-to-videovideo{url, seed}同上
seedance-2.0-image-to-videovideo{url, seed}同上
seedance-2.0-fast-image-to-videovideo{url, seed}同上
seedance-2.0-reference-to-videovideo{url, seed}同上
seedance-2.0-fast-reference-to-videovideo{url, seed}同上

PBR 材质类(单任务返回多个带语义标签的结果)

modeltyperesults[i] 结构说明
patina-pbr-mapsimage{url, content_type, result_type: "pbr_map", map_type}PBR 贴图生成。map_type 标识贴图类型(如 albedo / normal / roughness 等)
patina-materialimage混合两种:{url, content_type, result_type: "texture"}{url, content_type, result_type: "pbr_map", map_type}同时输出平铺纹理和多张 PBR 贴图;按 result_type 区分
patina-material-extractimagepatina-material从现有图提取纹理生成 PBR 贴图组

解析建议

  • 先读 model,再解析 results:同一 type 下不同 model 的结构可能完全不同
  • URL 类结果注意过期:所有 url 有效期 24 小时,业务侧应在收到结果后立即下载转存
  • 档案类任务返回的 voice_id / character_id / profile_id 是长期有效的资源标识,可直接用于后续任务参数

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

路径参数

task_id
string
必填

任务ID,由提交任务接口返回

示例:

"task-unified-1757165031-uyujaw3d"

查询参数

sync_upstream
boolean
默认值:false

是否在返回前主动刷新一次任务状态。仅对仍在执行且已有关联远端任务的记录生效;否则直接返回当前任务状态。

示例:

true

响应

查询成功

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

object
enum<string>

任务的具体类型

可用选项:
video.generation.task,
image.generation.task,
audio.generation.task,
llm.generation.task
示例:

"video.generation.task"

type
enum<string>

任务的输出类型

可用选项:
video,
image,
audio,
llm
示例:

"video"

model
string

实际使用的模型名称

示例:

"lipsync-2"

status
enum<string>

任务状态

可选值:

含义
pending等待处理
processing处理中
completed已完成
failed已失败
可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

progress
integer

任务进度百分比

必填范围: 0 <= x <= 100
示例:

0

created
integer

任务创建时间戳(Unix 秒)

示例:

1757165031

results
object[] | null

任务结果列表,仅在 status=completed 时有值。

结构按任务输出类型(type)不同:

typeresults[i] 结构典型场景
image{url},部分模型附带 content_type;特殊任务(如 PHOTA 创建档案)为 {result_type, profile_id}图片生成、编辑、增强
video{url},部分模型附带 content_type / seed;特殊子任务(Kling 创建语音 / Sora 2 角色档案)为 {voice_id}{character_id, name}视频生成、对口型
audio(TTS / 音乐){url}语音合成、音乐生成
audio(STT / 转写){text, language_code, language_probability, words[]}不含 url语音转写(如 Scribe V2)
llm完整 OpenAI ChatCompletion{id, object:"chat.completion", created, model, choices[].message, usage}LLM 生成(llm_gateway / llm_async)

通用说明:

  • 结果中的 URL 有效期为 24 小时,请尽快保存
  • type=llm 的结果是对话响应,不产生 URL
  • 部分任务是"非媒体产物"(创建语音档案 / 角色档案等),results 不含 url 而是 id 类字段

图片结果(type=image)。多数图片模型只返回 url;少数模型(Patina 家族)会附带 content_type;PHOTA 创建档案类任务返回 {result_type, profile_id}(非图片产物)

error
object

错误信息,仅在 status=failed 时有值

usage
object

计费信息