Get generation task status
curl --request GET \
--url https://api.poyo.ai/api/generate/status/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.poyo.ai/api/generate/status/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.poyo.ai/api/generate/status/{task_id}', 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.poyo.ai/api/generate/status/{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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.poyo.ai/api/generate/status/{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.poyo.ai/api/generate/status/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/status/{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_bodyTask Lifecycle
Submit generation work and retrieve its normalized status.
GET
/
api
/
generate
/
status
/
{task_id}
Get generation task status
curl --request GET \
--url https://api.poyo.ai/api/generate/status/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.poyo.ai/api/generate/status/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.poyo.ai/api/generate/status/{task_id}', 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.poyo.ai/api/generate/status/{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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.poyo.ai/api/generate/status/{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.poyo.ai/api/generate/status/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/status/{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_bodyTask Lifecycle
Long-running model execution follows:submit -> task_id -> queued/running -> succeeded/failed
poyo_submit_job and poyo_check_job, or the CLI:
poyo submit MODEL_ID --input-file request.json
poyo task wait TASK_ID --timeout 300
Normalized statuses
| Status | Meaning |
|---|---|
queued | Accepted but waiting for execution |
running | A worker or provider is processing |
succeeded | Output is ready |
failed | Terminal failure; inspect error_message |
Resume safely
Keep thetask_id in durable application state or working notes. If a process or agent session is interrupted, query the existing task rather than submitting and paying for a replacement.
Polling
When a response includespoll_after_seconds, wait at least that long before the next status check. Otherwise, use bounded exponential backoff with jitter. Honor Retry-After after a 429 response.
Stop only on succeeded, failed, or your own timeout; a local timeout does not cancel the remote task.
2s -> 4s -> 8s -> 15s -> 30s
Result handling
On success:- Record the model ID, task ID, final status, and charged credits.
- Validate the expected output fields.
- Download generated files to storage you control before temporary URLs expire.
- Treat repeated webhook deliveries and status reads as normal.
poyo_run_model waits for at most 30 seconds. If the work is still running, it returns the task ID and poll_after_seconds instead of failing the generation.