Skip to main content
POST

Common request body

All capabilities share the following top-level fields. The shape of input varies by model.

Image generation

Use for text-to-image, reference-image generation, and similar scenarios. The following fields are inside the input object.
string
required
Text prompt describing the image to generate.
string
Aspect ratio such as 1:1, 16:9, or 9:16. Supported values depend on the selected model.
string
Output resolution tier such as 1K or 2K. Supported values depend on the selected model.
array
Reference or input image URL list (string array) for image-to-image or style reference. Pass [] when not needed.
integer
Number of images to generate. Default 1. Actual limit depends on model and quota.
string
Output encoding such as png, jpeg, or webp. Uses platform or model default when omitted.
Different models may support different subsets of these fields. See each model page for details. Unsupported fields may be ignored or return a parameter error.

Video generation

Use for text-to-video and related scenarios. The following fields are inside the input object. Supported resolution tiers, duration options, and other values vary by model.
string
required
Text prompt describing video content and camera motion.
string
Aspect ratio such as 16:9, 9:16, or 1:1. Supported values depend on the selected model.
string
Output resolution tier such as 720P or 1080P. Supported values depend on the selected model.
string
Video duration, usually passed as a string seconds value or model-specific enum (e.g. "4" for 4 seconds). Supported values vary by model.
If a field is invalid for the current model, it may be ignored or trigger a validation error. Extended fields (such as first-frame image URLs) are documented on each model page.

Audio generation

Audio input fields (voice, speed, sample rate, etc.) vary by model. Parameter details and examples will be added in a future release. Refer to the corresponding model page or console documentation when integrating.
Poll task status with Get a prediction using data.task_id.

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
required

Model ID as shown on each model page (may follow <provider>/<model-name>).

Example:

"gemini-2.5-flash-image"

input
object
required

Input parameters for the selected model. See model pages for supported fields.

webhook
string<uri>

Optional HTTPS callback URL when task status or results update.

Example:

"https://api.shuyou.ai/api/callback"

Response

Async task created

data
object
required