cURL
curl --request GET \
--url https://api.ttapi.io/sora/fetch \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"jobId": "<string>"
}
'import requests
url = "https://api.ttapi.io/sora/fetch"
payload = { "jobId": "<string>" }
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({jobId: '<string>'})
};
fetch('https://api.ttapi.io/sora/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/sora/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jobId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/sora/fetch"
payload := strings.NewReader("{\n \"jobId\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("TT-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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/sora/fetch")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/sora/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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jobId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "",
"jobId": "c679a92e-dae0-462d-b70f-dcfeaf2189fa",
"data": {
"model": "sora-2",
"prompt": "风格:现代广告,现实主义,iPhone 摄影 场景:市中心的一家咖啡馆。 一个穿着浅色衬衫的男人打开笔记本电脑喝咖啡。 摄像机:特写,轻微变焦 灯光:来自窗户的柔和光线,桌子上的反射 动作:抬头 微笑 打字",
"referImages": null,
"videoUrl": "https://cdn.ttapi.io/other/2025-10-10/35f50ab8-6f98-493d-94c4-5587ca246bb3.mp4",
"quota": "3",
"finishTime": "2025-10-10 07:24:42",
"hookUrl": null
}
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}查询任务结果
deprecated
通过jobId查询当前视频生成结果
GET
/
sora
/
fetch
cURL
curl --request GET \
--url https://api.ttapi.io/sora/fetch \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"jobId": "<string>"
}
'import requests
url = "https://api.ttapi.io/sora/fetch"
payload = { "jobId": "<string>" }
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({jobId: '<string>'})
};
fetch('https://api.ttapi.io/sora/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/sora/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'jobId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ttapi.io/sora/fetch"
payload := strings.NewReader("{\n \"jobId\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("TT-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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/sora/fetch")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/sora/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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jobId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "",
"jobId": "c679a92e-dae0-462d-b70f-dcfeaf2189fa",
"data": {
"model": "sora-2",
"prompt": "风格:现代广告,现实主义,iPhone 摄影 场景:市中心的一家咖啡馆。 一个穿着浅色衬衫的男人打开笔记本电脑喝咖啡。 摄像机:特写,轻微变焦 灯光:来自窗户的柔和光线,桌子上的反射 动作:抬头 微笑 打字",
"referImages": null,
"videoUrl": "https://cdn.ttapi.io/other/2025-10-10/35f50ab8-6f98-493d-94c4-5587ca246bb3.mp4",
"quota": "3",
"finishTime": "2025-10-10 07:24:42",
"hookUrl": null
}
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}Body
application/json
生成的视频的jobId
Response
创建视频请求成功(任务状态通过status区分:排队中/处理中/成功/失败)
任务状态:PENDING_QUEUE-排队中,ON_QUEUE-处理中,SUCCESS-成功,FAILED-失败
Available options:
PENDING_QUEUE, ON_QUEUE, SUCCESS, FAILED Example:
"SUCCESS"
响应信息:成功时为空字符串,失败时返回具体错误原因(如「额度不足」「提示词违规」)
Example:
""
任务唯一标识ID,用于查询任务状态/接收回调通知
Example:
"c679a92e-dae0-462d-b70f-dcfeaf2189fa"
创建视频
- 创建视频
- 创建角色
- 去水印
Show child attributes
Show child attributes
Last modified on May 5, 2026
⌘I