获取请求状态
方法: GET路径: /
Queue 可以具有以下类型之一及其各自的属性:status
IN_QUEUE:
queue_position:任务在队列中的当前位置。 response_url:处理任务后响应可用的 URL。 IN_PROGRESS:
logs:与请求相关的日志数组。请注意,需要启用它,如下一节所述。 response_url:响应可用的 URL。 已完成:
logs:与请求相关的日志数组。请注意,需要启用它,如下一节所述。 response_url:响应可用的 URL。
请求参数
Header 参数
text
Content-Type
string
可选
示例:
application/json
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}请求示例代码
Shell
bash
curl --location -g --request GET '/{{model_name}}/requests/{{request_id}}/status' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
status
string
必需
queue_position
integer
必需
response_url
string
必需示例
json
{
"status": "IN_QUEUE",
"queue_position": 0,
"response_url": "https://queue.fal.run/fal-ai/fast-sdxl/requests/80e732af-660e-45cd-bd63-580e4f2a94cc"
}