Public API
Platform-wide endpoints
Overview
The Public API exposes platform capabilities that are not tied to any specific model. It is split into two groups: File Upload — push local assets to object storage so generation endpoints can consume URLs; Task Management — poll asynchronous task status and receive webhook callbacks.
Authentication
All Public API endpoints use the same Bearer token scheme as the AI API:
Authorization: Bearer sk-xxxxxx, identical to any platform-issued token.
File Upload
Three upload methods cover different source scenarios — the response shape is identical: images persist 72 hours, videos 24 hours; filenames are server-generated and every file is written under a temp/ prefix.
Upload Stream
Direct multipart/form-data upload of a local file. Most common.
Upload Base64
Decode a Base64 string (with optional data URL prefix) and upload.
Upload from URL
The platform fetches the remote URL and stores it in object storage.
Task Management
Image, video and other task-style endpoints share a single status-polling and callback contract.
How is this guide?
Last updated on