查询图片生成任务状态
curl --request GET \
--url https://xxx.wengaocloud.com/v2/images/generations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://xxx.wengaocloud.com/v2/images/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://xxx.wengaocloud.com/v2/images/generations/{id}', 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://xxx.wengaocloud.com/v2/images/generations/{id}"
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))
}{
"id": "imgtask_5a16c0f5d2b64b40a86f7f5b21f42a61",
"object": "image.generation.task",
"model": "gpt-image-2-async",
"status": "running",
"created_at": 1779860000,
"completed_at": null
}图片生成
查询图片生成任务状态
查询图片异步任务状态和结果。查询接口只读取平台任务状态。
查询图片生成任务状态
curl --request GET \
--url https://xxx.wengaocloud.com/v2/images/generations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://xxx.wengaocloud.com/v2/images/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://xxx.wengaocloud.com/v2/images/generations/{id}', 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://xxx.wengaocloud.com/v2/images/generations/{id}"
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))
}{
"id": "imgtask_5a16c0f5d2b64b40a86f7f5b21f42a61",
"object": "image.generation.task",
"model": "gpt-image-2-async",
"status": "running",
"created_at": 1779860000,
"completed_at": null
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
创建接口返回的图片任务 ID,通常以 imgtask_ 开头。
响应
图片任务状态。任务成功后返回问高云图片 URL。
示例:
"imgtask_5a16c0f5d2b64b40a86f7f5b21f42a61"
可用选项:
image.generation.task 示例:
"gpt-image-2-async"
可用选项:
queued, running, succeeded, failed, cancelled, expired Unix 时间戳,秒。
Unix 时间戳,秒。
.png?fit=max&auto=format&n=v_sJS-AFS6goKAv3&q=85&s=e03202fddb83c95be2a503ab9c79163a)