Skip to main content
APIXO uses an asynchronous pattern for all generation tasks. This design handles the reality that AI generation takes time—from a few seconds for images to several minutes for videos.

The Pattern

Step 1: Submit a Task

Send a POST request to create a generation task:
Request:
Response:
The API immediately returns a taskId. The actual generation happens in the background.

Step 2: Get Results

You have two options to receive results: Periodically check the task status:
Response (in progress):
Response (completed):
Provide a callback_url when submitting:
APIXO will POST the result to your URL when the task completes. See Webhooks for implementation details.

Task States

Polling Best Practices

  1. Start with 3-5 second intervals for most tasks
  2. Use exponential backoff for long-running tasks (videos)
  3. Set a maximum timeout (e.g., 5 minutes)
  4. Handle failures gracefully with retry logic

When to Use Each Approach

Next Steps

Generation API Overview

Understand the async API pattern for image, video, and audio models

Generate Task

Submit a generation task and receive a task ID

Polling vs Webhooks

Deep dive into both approaches