Skip to main content
GET
Get task status

Get Task Status

Query the execution status of image, video, audio, 3D, and content moderation tasks and retrieve results when complete.

Endpoint

Authentication

All requests require Bearer token authentication:

Get API Key

Generate your API key from the console

Parameters

Path Parameters

Response

Success Response (200)

Response Fields

For Omni Moderation, inspect data.output.results[].flagged after the status becomes finished. A flagged: true result means the review completed and detected content; it does not make the task failed. Omni Moderation runs asynchronously, and supports callbacks through callback_url. Streaming is not supported. Its callback body is the same task data object returned here, including output when available and credits_amount: 0.

Status Values

Response Examples by Status

Not Started

Running

Finished (Image)

Finished (Video)

Finished (TTS)

Finished (3D)

Failed

Code Examples

cURL

Python

JavaScript / Node.js

Go

Java

PHP

Ruby

Polling Best Practices

When polling for task completion, follow these recommendations:
Poll Interval: Check status every 2-5 seconds. Avoid polling more frequently to prevent rate limiting.
Timeout: Implement timeouts to avoid infinite loops. Typical generation times:
  • Images: 15-60 seconds
  • Videos: 90-300 seconds
Exponential Backoff: On rate limit (429) or server errors (5xx), implement exponential backoff (wait 1s, 2s, 4s, 8s…).

Complete Polling Example

Error Responses

HTTP Error Codes

Error Response Format

Important Notes

Content Validity: Generated images and videos are accessible for 3 days after creation. Download and save your content promptly.
Webhooks: For models that support callbacks, you can provide a callback_url when submitting tasks to receive automatic notifications. Omni Moderation callbacks include the same output object as status queries. See Webhook Callbacks.

Next Steps

Submit Task

Learn how to submit generation tasks

Image Models

Browse all image models

Video Models

Browse all video models

Quick Start

Complete integration guide

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication.

Create an API key: sign in to PoYo, open Dashboard → API Key at poyo.ai/dashboard/api-key, and click to create a key.

Add it to the request header:

Path Parameters

task_id
string
required

Unique task identifier

Response

Task status retrieved successfully

code
enum<integer>
required

Business status code. 200 means success; any other value means the request failed. Always check this field: some validation errors return HTTP 200 with code: 400 in the body.

  • 200: Success
  • 400: Invalid request parameters
  • 401: Missing or invalid API key
  • 402: Insufficient credits
  • 403: Permission denied
  • 404: Resource not found
  • 408: Request timeout
  • 429: Rate limit exceeded
  • 500: Internal server error
  • 502: Upstream service error
  • 503: Service unavailable

See Error Codes for details.

Available options:
200,
400,
401,
402,
403,
404,
408,
429,
500,
502,
503
Example:

200

data
object
required