Skip to main content

PoYo AI API Documentation

PoYo AI provides state-of-the-art image and video generation APIs with a unified, asynchronous architecture.

Base URL

All API requests should be made to:

Authentication

PoYo AI uses API key authentication. Include your API key in the Authorization header:

Get Your API Key

Visit the API Console to generate your API key

API Architecture

Unified Endpoints

PoYo AI uses a simple two-endpoint architecture for all generation types:

Submit Task

Submit image or video generation requests. Returns immediately with a task_id.

Query Status

Check task progress and retrieve results.

Asynchronous Processing

All generation tasks follow this workflow:
1

Submit Task

POST to /api/generate/submit with model and parameters
2

Receive Task ID

API returns task_id immediately with status not_started
3

Poll or Wait

Either poll /api/generate/status/{task_id} or receive webhook callback
4

Retrieve Results

When status is finished, get generated files from response

Response Format

All endpoints return JSON with a consistent structure:

Submit Response

Status Response

Task Status Values

Error Response

HTTP Status Codes

Task Management Options

Option 1: Polling (Simple)

Poll the status endpoint periodically:
Provide a callback_url to receive automatic notifications:

Webhook Documentation

Learn how to implement webhook callbacks

Important Notes

File Validity: Generated images and videos are accessible for 24 hours after creation. Download and save your content promptly.
Rate Limits: API rate limits vary by account type. Check your console dashboard for current limits.
Callbacks vs Polling: Webhooks are more efficient than polling and recommended for production use.

Quick Example