获取请求结果
▼
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
请求参数
Path 参数
model_name
string
必需
模型名称,auto 我们系统会自动判断model_name
示例: auto
request_id
string
必需
任务id
示例: 5ed6b6bb-eaa3-4006-859b-e2f3fa748d8c
请求示例代码
curl --location --request GET 'https://api.quickrouter.ai/fal-ai/{model_name}/requests/{request_id}' \
--header 'Authorization: Bearer YOUR_API_KEY'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/fal-ai/{model_name}/requests/{request_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
conn = http.client.HTTPSConnection("api.quickrouter.ai")
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
conn.request("GET", "/fal-ai/{model_name}/requests/{request_id}", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 application/json
status
string
可选
任务状态
images
array
可选
图片结果列表
video
object
可选
视频结果
示例
{
"seed": 2841475369,
"images": [
{
"url": "https://fal.media/files/tiger/BwdOcvXOx0UmkCyCMZGmZ_1ee10db761e146a28fdaadafa528d239.jpg",
"width": 1024,
"height": 1024,
"content_type": "image/jpeg"
}
],
"prompt": "Put the little duckling on top of the woman's t-shirt.",
"request": {
"prompt": "Put the little duckling on top of the woman's t-shirt.",
"image_urls": [
"https://v3.fal.media/files/penguin/XoW0qavfF-ahg-jX4BMyL_image.webp",
"https://v3.fal.media/files/tiger/bml6YA7DWJXOigadvxk75_image.webp"
],
"num_images": 1,
"output_format": "jpeg",
"guidance_scale": 3.5,
"safety_tolerance": "2"
},
"timings": {},
"has_nsfw_concepts": [false]
}