cURL
curl --request GET \
--url https://api.ttapi.io/novelai/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/novelai/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/novelai/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/novelai/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/novelai/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/novelai/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/novelai/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{
"data": {
"finishTime": "2026-02-12 09:09:11",
"hookUrl": null,
"imageUrl": [
"https://cdn.ttapi.io/xxx1.png",
"https://cdn.ttapi.io/xxx2.png"
],
"prompt": "1 young woman, professional talent service specialist, warm dark brown eyes, sleek black hair styled in a neat shoulder-length straight bob with soft side-swept bangs, wearing a tailored light blue blazer over a crisp white silk blouse, navy blue slim-fit dress pants, a small delicate silver wristwatch on the left wrist, a professional ID badge clipped to the lapel, black leather low-heeled pumps, gentle and approachable smile, friendly and professional appearance,solo,face front,full body,standing,full shot, white background, simple background, simple shadow,masterpiece, best quality,very aesthetic",
"quota": "4.00"
},
"jobId": "3b178ca1-78ee-41c1-94d7-3464b27a2439",
"message": "success",
"status": "SUCCESS"
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}Novel AI
NovelAI 查询 API 文档
通过 NovelAI 结果查询 API 获取图像生成任务状态、结果地址和返回数据,方便对接异步图像生成流程。
GET
/
novelai
/
fetch
cURL
curl --request GET \
--url https://api.ttapi.io/novelai/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/novelai/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/novelai/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/novelai/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/novelai/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/novelai/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/novelai/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{
"data": {
"finishTime": "2026-02-12 09:09:11",
"hookUrl": null,
"imageUrl": [
"https://cdn.ttapi.io/xxx1.png",
"https://cdn.ttapi.io/xxx2.png"
],
"prompt": "1 young woman, professional talent service specialist, warm dark brown eyes, sleek black hair styled in a neat shoulder-length straight bob with soft side-swept bangs, wearing a tailored light blue blazer over a crisp white silk blouse, navy blue slim-fit dress pants, a small delicate silver wristwatch on the left wrist, a professional ID badge clipped to the lapel, black leather low-heeled pumps, gentle and approachable smile, friendly and professional appearance,solo,face front,full body,standing,full shot, white background, simple background, simple shadow,masterpiece, best quality,very aesthetic",
"quota": "4.00"
},
"jobId": "3b178ca1-78ee-41c1-94d7-3464b27a2439",
"message": "success",
"status": "SUCCESS"
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}最后修改于 2026年3月21日
⌘I