cURL
curl --request GET \
--url https://api.ttapi.io/midjourney/video/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/midjourney/video/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/midjourney/video/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/midjourney/video/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/midjourney/video/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/midjourney/video/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/midjourney/video/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": "",
"jobId": "c679a92e-dae0-462d-b70f-dcfeaf2189fa",
"data": {
"action": "generate",
"jobId": "943583cb-08f4-4077-ad1e-f1bfc6c1191a",
"progress": "100",
"prompt": "hyperrealistic album cover: Black sacral Ocean. Sunken prayer canoe. Ghost Canoe Horizon",
"quota": "30",
"videos": [
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/0.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/1.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/2.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/3.mp4"
],
"hookUrl": "https://webhook-test.com/1cb411db3bc4bfa7729c7df3ca2c1a5e"
}
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}Midjourney
获取任务状态 - fetch
查询任务结果,该接口不消耗quota,免费使用
GET
/
midjourney
/
video
/
fetch
cURL
curl --request GET \
--url https://api.ttapi.io/midjourney/video/fetch \
--header 'TT-API-KEY: <api-key>'import requests
url = "https://api.ttapi.io/midjourney/video/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/midjourney/video/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/midjourney/video/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/midjourney/video/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/midjourney/video/fetch")
.header("TT-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/midjourney/video/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": "",
"jobId": "c679a92e-dae0-462d-b70f-dcfeaf2189fa",
"data": {
"action": "generate",
"jobId": "943583cb-08f4-4077-ad1e-f1bfc6c1191a",
"progress": "100",
"prompt": "hyperrealistic album cover: Black sacral Ocean. Sunken prayer canoe. Ghost Canoe Horizon",
"quota": "30",
"videos": [
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/0.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/1.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/2.mp4",
"https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/3.mp4"
],
"hookUrl": "https://webhook-test.com/1cb411db3bc4bfa7729c7df3ca2c1a5e"
}
}{
"status": "FAILED",
"message": "\"prompt\" cannot be empty.",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}最后修改于 2026年3月13日
⌘I