Query T2A Async V2 Task Status
curl --request GET \
--url https://api.minimax.io/v1/query/t2a_async_query_v2 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.minimax.io/v1/query/t2a_async_query_v2"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.minimax.io/v1/query/t2a_async_query_v2', 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.minimax.io/v1/query/t2a_async_query_v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.minimax.io/v1/query/t2a_async_query_v2"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.minimax.io/v1/query/t2a_async_query_v2")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/query/t2a_async_query_v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": 95157322514444,
"status": "Processing",
"file_id": 95157322514496,
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}T2A Async
Query Speech Generation Task Status
Use this API to query the status of an asynchronous Text-to-Speech task.
GET
/
v1
/
query
/
t2a_async_query_v2
Query T2A Async V2 Task Status
curl --request GET \
--url https://api.minimax.io/v1/query/t2a_async_query_v2 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.minimax.io/v1/query/t2a_async_query_v2"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.minimax.io/v1/query/t2a_async_query_v2', 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.minimax.io/v1/query/t2a_async_query_v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.minimax.io/v1/query/t2a_async_query_v2"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.minimax.io/v1/query/t2a_async_query_v2")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/query/t2a_async_query_v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": 95157322514444,
"status": "Processing",
"file_id": 95157322514496,
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Note: This API allows a maximum of 10 queries per second.
Authorizations
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme:
Bearer API_key, can be found in Account Management>API Keys.
Query Parameters
The task ID returned when the task was submitted.
Response
200 - application/json
The task ID.
The current status of the task.
- Processing: The task is still being processed
- Success: The task has completed successfully
- Failed: The task failed
- Expired: The task has expired
Available options:
success, failed, expired, processing The ID of the audio file generated when the task was created. Once the task is complete, you can use the file_id to download the file via the File(Retrieve) API.
This field will not be returned if the request encounters an error.
Note: The returned download URL is valid for 9 hours (32,400 seconds) from the time it is generated.
Status code and details.
Show child attributes
Show child attributes
⌘I