Query Task Result
curl --request GET \
--url https://api.modellix.ai/api/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.modellix.ai/api/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.modellix.ai/api/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.modellix.ai/api/v1/tasks/{task_id}"
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.modellix.ai/api/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();const url = 'https://api.modellix.ai/api/v1/tasks/{task_id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.modellix.ai/api/v1/tasks/{task_id}",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.modellix.ai/api/v1/tasks/{task_id}")
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_bodyimport Foundation
let url = URL(string: "https://api.modellix.ai/api/v1/tasks/{task_id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.modellix.ai/api/v1/tasks/{task_id}' -Method GET -Headers $headers{
"code": 0,
"message": "success",
"data": {
"status": "success",
"task_id": "task-abc123",
"model_id": "qwen-image-plus",
"duration": 3500,
"billing": {
"status": "succeeded",
"amount": 12.3456
},
"result": {
"resources": [
{
"url": "https://cdn.example.com/images/abc123.png",
"type": "image",
"width": 1024,
"height": 1024,
"format": "png",
"role": "primary"
}
],
"metadata": {
"image_count": 1
},
"extensions": {
"submit_time": 1704067200000,
"end_time": 1704067203000
}
},
"result_expires_at": 1704153600000
}
}Query Task Result
Query the status and results of an async task by task_id
GET
/
api
/
v1
/
tasks
/
{task_id}
Query Task Result
curl --request GET \
--url https://api.modellix.ai/api/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.modellix.ai/api/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.modellix.ai/api/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.modellix.ai/api/v1/tasks/{task_id}"
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.modellix.ai/api/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();const url = 'https://api.modellix.ai/api/v1/tasks/{task_id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.modellix.ai/api/v1/tasks/{task_id}",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.modellix.ai/api/v1/tasks/{task_id}")
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_bodyimport Foundation
let url = URL(string: "https://api.modellix.ai/api/v1/tasks/{task_id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.modellix.ai/api/v1/tasks/{task_id}' -Method GET -Headers $headers{
"code": 0,
"message": "success",
"data": {
"status": "success",
"task_id": "task-abc123",
"model_id": "qwen-image-plus",
"duration": 3500,
"billing": {
"status": "succeeded",
"amount": 12.3456
},
"result": {
"resources": [
{
"url": "https://cdn.example.com/images/abc123.png",
"type": "image",
"width": 1024,
"height": 1024,
"format": "png",
"role": "primary"
}
],
"metadata": {
"image_count": 1
},
"extensions": {
"submit_time": 1704067200000,
"end_time": 1704067203000
}
},
"result_expires_at": 1704153600000
}
}Authorizations
API Key authentication. Format: Bearer YOUR_API_KEY
Path Parameters
Task ID returned by async interface
Example:
"task-abc123"
⌘I