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": "A professional full-body flat lay photo of a beautiful female model wearing this outfit. High resolution, photorealistic, perfect detail of all clothing elements, professional pose, attractive figure, trendy style, smiling, fair-skinned Caucasian woman.",
"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-Image Result [Unofficial]
Query image generation result
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": "A professional full-body flat lay photo of a beautiful female model wearing this outfit. High resolution, photorealistic, perfect detail of all clothing elements, professional pose, attractive figure, trendy style, smiling, fair-skinned Caucasian woman.",
"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"
}
}Authorizations
You can obtain your API key from the TTAPI Dashboard.
Query Parameters
Job ID returned synchronously by the generation endpoint (supports URL parameters/request body)
Response
Request successful
Task status: ON_QUEUE-processing, SUCCESS-success, FAILED-failed
Available options:
SUCCESS, ON_QUEUE, FAILED Example:
"SUCCESS"
Response message: returns success on success, returns specific error reason on failure, returns null during processing
Example:
"success"
Unique task identifier for querying task status or receiving callback notifications
Example:
"5ecc5080-b1d7-4b9f-8184-435e46ebb5cb"
Task data (different fields returned based on status)
- SUCCESS
- ON_QUEUE
- FAILED
Show child attributes
Show child attributes
Last modified on April 22, 2026