Skip to main content

PoYo AI API Documentation

PoYo AI provides image, video, LLM, 3D, and music APIs behind one API key.

Model Categories

Generation models (image, video, 3D, music) run as asynchronous tasks. LLMs answer directly in the HTTP response or as a stream. The rest of this page describes the asynchronous task flow used by generation models.

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

Image, video, 3D, and most audio models use two endpoints:

Submit Task

Submit a generation request. 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 3 days 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