cURL
curl --request GET \
--url https://api.ttapi.io/openai/gpt/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/openai/gpt/fetch"
headers = {"TT-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'TT-API-KEY': '<api-key>'}};
fetch('https://api.ttapi.io/openai/gpt/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ttapi.io/openai/gpt/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"TT-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/openai/gpt/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TT-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ttapi.io/openai/gpt/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/openai/gpt/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TT-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "success",
"jobId": "5ecc5080-b1d7-4b9f-8184-435e46ebb5cb",
"data": {
"prompt": "画一张美女模特该衣服平面照拍摄照片,要求高像素,高逼真度,完美还原衣服所有细节,全身照专业姿势,身材性感,穿着潮流,面带微笑,欧美女性皮肤白皙",
"referImages": [
"https://cdn.ttapi.io/demo/2025-03-30/5d17dd5207daeeac86bcecd2d6405a0.jpg"
],
"imageUrl": "https://cdnc.ttapi.io/2025-03-31/cd3f3ce5-06be-4b3a-9aed-014045ca1804.png",
"quota": "2",
"finishTime": "2025-03-31 04:25:33",
"hookUrl": "https://webhook-test.com/b129b43b6619f977b3227387fc290f7d"
}
}OpenAI Image
GPT-生成结果查询 [非官转]
查询画图结果
GET
/
openai
/
gpt
/
fetch
cURL
curl --request GET \
--url https://api.ttapi.io/openai/gpt/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/openai/gpt/fetch"
headers = {"TT-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'TT-API-KEY': '<api-key>'}};
fetch('https://api.ttapi.io/openai/gpt/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ttapi.io/openai/gpt/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"TT-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/openai/gpt/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TT-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ttapi.io/openai/gpt/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/openai/gpt/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TT-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "success",
"jobId": "5ecc5080-b1d7-4b9f-8184-435e46ebb5cb",
"data": {
"prompt": "画一张美女模特该衣服平面照拍摄照片,要求高像素,高逼真度,完美还原衣服所有细节,全身照专业姿势,身材性感,穿着潮流,面带微笑,欧美女性皮肤白皙",
"referImages": [
"https://cdn.ttapi.io/demo/2025-03-30/5d17dd5207daeeac86bcecd2d6405a0.jpg"
],
"imageUrl": "https://cdnc.ttapi.io/2025-03-31/cd3f3ce5-06be-4b3a-9aed-014045ca1804.png",
"quota": "2",
"finishTime": "2025-03-31 04:25:33",
"hookUrl": "https://webhook-test.com/b129b43b6619f977b3227387fc290f7d"
}
}查询参数
生成接口同步返回的jobId(支持URL参数/请求体传递)
响应
请求成功
任务状态:ON_QUEUE-处理中,SUCCESS-成功,FAILED-失败
可用选项:
SUCCESS, ON_QUEUE, FAILED 示例:
"SUCCESS"
响应信息:成功时返回success,失败时返回具体错误原因,处理中返回null
示例:
"success"
任务唯一标识ID,用于查询任务状态/接收回调通知
示例:
"5ecc5080-b1d7-4b9f-8184-435e46ebb5cb"
任务数据(不同状态返回字段值不同)
- SUCCESS
- ON_QUEUE
- FAILED
Show child attributes
Show child attributes
最后修改于 2026年4月22日
⌘I