查询图片任务
GET
/
v1
/
images
/
{taskId}
Query image task
curl --request GET \
--url https://sigrunai.com/v1/images/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sigrunai.com/v1/images/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sigrunai.com/v1/images/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sigrunai.com/v1/images/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 20000,
"msg": "<string>",
"data": {
"task_id": "<string>",
"status": "<string>",
"progress": 123,
"model": "<string>",
"created_at": 123,
"completed_at": 123,
"cost": 123,
"error_message": "<string>",
"result": {
"image_url": "<string>",
"video_url": "<string>"
}
}
}
图片地址(result.image_url)保存有效期约 3 天,请及时转存。
创建与查询返回同一套 data 结构;data.cost 为本次扣费(积分)。
任务状态
| status | 说明 |
|---|---|
queued / pending / submitted | 已提交,等待调度 |
processing / in_progress / running | 生成中 |
completed / success / succeeded | 成功,可读 result.image_url |
failed | 失败,见 error_message |
curl -X GET 'https://sigrunai.com/v1/images/img_xxxxxxxx' \
-H 'Authorization: Bearer sk_xxx'
最后修改于 2026年10月15日
⌘I
Query image task
curl --request GET \
--url https://sigrunai.com/v1/images/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sigrunai.com/v1/images/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sigrunai.com/v1/images/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sigrunai.com/v1/images/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 20000,
"msg": "<string>",
"data": {
"task_id": "<string>",
"status": "<string>",
"progress": 123,
"model": "<string>",
"created_at": 123,
"completed_at": 123,
"cost": 123,
"error_message": "<string>",
"result": {
"image_url": "<string>",
"video_url": "<string>"
}
}
}