通用能力接口参考任务查询任务

查询任务

查询任务状态:queued、processing、succeeded、failed 或 cancelled。progress 可能为 null,这不代表任务停滞。

认证

API Key:X-API-Key: <API Key> 或 Authorization: Bearer <API Key>。

示例中的凭证为占位值,请替换后在服务器端运行。

代码示例

curl -X GET 'https://shixux.com/api/v1/jobs/job_id_example' \  -H 'X-API-Key: yb_xxx_yyy'
{  "id": "job_xxx",  "type": "tts",  "status": "queued",  "reserved_credits": 1,  "actual_credits": 1,  "error_code": "example",  "error_message": "example",  "created_at": "2026-10-06T10:00:00Z",  "started_at": "2026-10-06T10:00:00Z",  "finished_at": "2026-10-06T10:00:00Z"}

路径参数

job_id*Job Id

响应体

请求成功

application/json
  1. response
provider_failure?

User-facing reason and recovery action derived from a failed video generation receipt. Includes only safe service identifiers. Portrait enrollment is indicated only when explicitly requested in the receipt.

actual_credits*number|null
created_at*Created At
格式date-time
error_code*|

失败原因代码。IMAGE_REFERENCE_COPYRIGHT、IMAGE_PROMPT_COPYRIGHT、IMAGE_OUTPUT_COPYRIGHT 分别表示参考图、提示词或生成图片未通过版权审核;IMAGE_PROVIDER_INVALID_PARAMETERS 表示请求参数未被图片模型接受;IMAGE_PROVIDER_NO_RESULT 表示任务结束但没有可用结果;IMAGE_SUBMISSION_NOT_ACCEPTED 表示图片提交未被受理。以上情况均退回预扣积分或不扣费。

error_message*string|null
finished_at*|null
id*Id
reserved_credits*Reserved Credits
started_at*|null
status*JobStatus
可选值"queued""processing""succeeded""failed""cancelled"
type*JobType
可选值"tts""avatar""video""video_analysis""image""voice_design""audio_composition"
webhook_endpoint_id?|

任务结束时接收通知的 Webhook 端点 ID,须属于当前账号且已启用。

progress?number
范围0 <= value <= 1

本页目录