Copy {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [
"data"
],
"properties" : {
"data" : {
"type" : "object" ,
"required" : [
"task_id" ,
"platform" ,
"model" ,
"status" ,
"created_at" ,
"updated_at" ,
"submit_time" ,
"start_time" ,
"finish_time" ,
"last_activity_at" ,
"stalled_threshold_seconds" ,
"elapsed_since_activity_seconds" ,
"current_task_amount" ,
"reason_codes" ,
"observed_at" ,
"quota_per_usd" ,
"request_id" ,
"request_path" ,
"funding" ,
"billing" ,
"evidence" ,
"automatic_retry_allowed" ,
"reconciliation_review_url"
],
"properties" : {
"task_id" : {
"type" : [
"string" ,
"null"
],
"description" : "任务公开 ID"
},
"platform" : {
"type" : [
"string" ,
"null"
],
"description" : "任务平台或插件标识"
},
"model" : {
"type" : [
"string" ,
"null"
],
"description" : "模型公开调用名称(model_name)"
},
"status" : {
"type" : "string" ,
"enum" : [
"NOT_START" ,
"SUBMITTED" ,
"QUEUED" ,
"IN_PROGRESS" ,
"SUCCESS" ,
"FAILURE" ,
"UNKNOWN"
],
"description" : "原生任务状态"
},
"created_at" : {
"type" : "integer" ,
"description" : "创建时间(Unix 秒)"
},
"updated_at" : {
"type" : "integer" ,
"description" : "更新时间(Unix 秒)"
},
"submit_time" : {
"type" : "integer" ,
"description" : "提交时间(Unix 秒)"
},
"start_time" : {
"type" : "integer" ,
"description" : "开始时间(Unix 秒)"
},
"finish_time" : {
"type" : "integer" ,
"description" : "结束时间(Unix 秒)"
},
"last_activity_at" : {
"type" : "integer" ,
"description" : "最近状态活动时间(Unix 秒)"
},
"stalled_threshold_seconds" : {
"type" : "integer" ,
"description" : "判定超时停滞的秒数阈值(非计费时长)"
},
"elapsed_since_activity_seconds" : {
"type" : "integer" ,
"description" : "距最近活动的秒数(非计费时长)"
},
"current_task_amount" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
},
"description" : "任务当前持久化 quota 记录,不是原预扣金额,也不能直接视为用户最终净支出"
},
"reason_codes" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
"enum" : [
"task_status_unknown" ,
"task_failed" ,
"task_stalled" ,
"invalid_task_quota" ,
"missing_billing_evidence" ,
"invalid_billing_evidence" ,
"task_changed_during_read" ,
"success_settlement_unconfirmed" ,
"failed_task_has_charge" ,
"missing_request_provenance"
]
},
"description" : "只读异常与账务诊断原因码列表"
},
"observed_at" : {
"type" : "integer" ,
"description" : "本次诊断读取时间(Unix 秒)"
},
"quota_per_usd" : {
"type" : "string" ,
"const" : "1000000"
},
"request_id" : {
"type" : [
"string" ,
"null"
],
"description" : "关联的原请求 ID;缺失时为 null 并附带 missing_request_provenance"
},
"request_path" : {
"type" : [
"string" ,
"null"
],
"description" : "关联的原请求路径(如 /pg/videos 或 /v1/videos)"
},
"funding" : {
"type" : "object" ,
"required" : [
"source" ,
"credential_type"
],
"properties" : {
"source" : {
"type" : "string" ,
"enum" : [
"wallet" ,
"subscription" ,
"unknown"
],
"description" : "资金来源"
},
"credential_type" : {
"type" : "string" ,
"enum" : [
"login_session" ,
"inference_key" ,
"unknown"
],
"description" : "发起调用的凭据类型"
}
}
},
"billing" : {
"type" : "object" ,
"required" : [
"state" ,
"finalized" ,
"observed_net_charge" ,
"original_reserved_amount" ,
"settlement_receipt"
],
"properties" : {
"state" : {
"type" : "string" ,
"enum" : [
"unknown" ,
"reserved" ,
"settled" ,
"released"
],
"description" : "结算状态:reserved(保留中)、settled(已确认结算)、released(失败已确认退回)、unknown(待确认)"
},
"finalized" : {
"type" : "boolean" ,
"description" : "是否已有完整终态结算完成证据"
},
"observed_net_charge" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
},
"description" : "关联原生消费日志(type=2)减退款日志(type=6)的完整净扣费;无证据或并发变更时为 null"
},
"original_reserved_amount" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
},
"description" : "冻结计费快照记录的原预扣金额;无快照时为 null,不用当前任务 quota 冒充"
},
"settlement_receipt" : {
"type" : [
"object" ,
"null"
],
"description" : "PostgreSQL 异步任务终态结算完成凭证(oneaster_task_settlements);未完成或旧记录为 null" ,
"properties" : {
"version" : {
"type" : "integer" ,
"const" : 1
},
"settled_at" : {
"type" : "integer" ,
"description" : "结算完成时间(Unix 秒)"
},
"final_status" : {
"type" : "string" ,
"enum" : [
"SUCCESS" ,
"FAILURE"
]
},
"reserved_amount" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
}
},
"actual_amount" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
}
},
"delta_quota" : {
"type" : "string" ,
"description" : "带符号整数字符串:正数为补扣,负数为退差额,0 为等额完成"
}
}
}
}
},
"evidence" : {
"type" : "object" ,
"required" : [
"consume_count" ,
"refund_count" ,
"invalid_count" ,
"logs" ,
"logs_truncated" ,
"aggregate_complete"
],
"properties" : {
"consume_count" : {
"type" : "string" ,
"description" : "关联消费日志总条数(十进制字符串)"
},
"refund_count" : {
"type" : "string" ,
"description" : "关联退款日志总条数(十进制字符串)"
},
"invalid_count" : {
"type" : "string" ,
"description" : "异常日志条数(十进制字符串)"
},
"logs_truncated" : {
"type" : "boolean" ,
"description" : "日志明细是否因 50 条上限被截断(不影响完整总额汇总)"
},
"aggregate_complete" : {
"type" : "boolean" ,
"const" : true,
"description" : "总额始终基于完整关联日志集合计算"
},
"logs" : {
"type" : "array" ,
"maxItems" : 50 ,
"items" : {
"type" : "object" ,
"required" : [
"id" ,
"created_at" ,
"type" ,
"amount" ,
"request_id"
],
"properties" : {
"id" : {
"type" : "string"
},
"created_at" : {
"type" : "integer" ,
"description" : "日志时间(Unix 秒)"
},
"type" : {
"type" : "integer" ,
"enum" : [
2 ,
6
],
"description" : "2 为消费,6 为退款"
},
"amount" : {
"type" : "object" ,
"required" : [
"quota" ,
"credits"
],
"properties" : {
"quota" : {
"type" : [
"string" ,
"null"
],
"description" : "原生 quota 整数字符串(1 USD = 1000000 quota);未知时为 null,绝不补零"
},
"credits" : {
"type" : [
"string" ,
"null"
],
"description" : "四位小数 OneAster 积分字符串(1 USD = 100 积分);未知时为 null"
}
}
},
"request_id" : {
"type" : [
"string" ,
"null"
]
}
}
}
}
}
},
"automatic_retry_allowed" : {
"type" : "boolean" ,
"const" : false,
"description" : "固定为 false;诊断只读,严禁自动重发 UNKNOWN 或未确认任务"
},
"reconciliation_review_url" : {
"type" : [
"string" ,
"null"
],
"description" : "仅 Root 查看带 KIE 核账来源的 UNKNOWN 任务时返回对应核账路径,否则为 null"
}
},
"additionalProperties" : true
}
}
}
}
}
}