Image and video APIs
Service URL: https://api.xuo.cc. All endpoints below use a Xuo API key with Bearer authentication. First call GET /v1/models to confirm that the key can access the model.
Authorization: Bearer YOUR_XUO_API_KEYThe model list confirms model IDs and key access; it does not expose each model's complete parameter range. Use the model's upstream documentation, channel configuration, and active task plugin to determine supported sizes, quality levels, durations, resolutions, aspect ratios, and reference-media limits. Do not assume that one model's fields apply to another.
Image generation
Send JSON to POST /v1/images/generations. The example uses common OpenAI-compatible fields. Send only fields supported by the selected model; valid values and count limits are model-specific.
curl https://api.xuo.cc/v1/images/generations \
-H "Authorization: Bearer $XUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_IMAGE_MODEL",
"prompt": "A blue ceramic cup on a wooden table in soft morning light",
"n": 1,
"size": "1024x1024",
"quality": "standard",
"response_format": "url"
}'n is the requested number of images. The gateway's upper bound does not mean the upstream model supports that many images. Valid values for size, quality, and response_format vary by model. Do not guess fields that are absent from the model documentation.
Successful responses generally use the OpenAI image response shape, with image entries in the data array. An entry may contain url, b64_json, or revised_prompt. The actual format depends on the model and its response_format support. Save temporary upstream image URLs promptly.
Image editing
The standard image-edit endpoint is POST /v1/images/edits. Models that support it commonly accept reference images as multipart/form-data:
curl https://api.xuo.cc/v1/images/edits \
-H "Authorization: Bearer $XUO_API_KEY" \
-F "model=YOUR_IMAGE_EDIT_MODEL" \
-F "prompt=Keep the cup unchanged and replace the background with a garden" \
-F "[email protected]" \
-F "n=1"Some edit models use different input fields or JSON. If the model documentation requires an images URL array, mask, or other provider-specific fields, follow that model's requirements and confirm that the channel supports the format. File upload support does not imply that every upstream accepts the same file field.
Video tasks
Video uses an asynchronous task flow. Submit a task once to POST /v1/videos:
curl https://api.xuo.cc/v1/videos \
-H "Authorization: Bearer $XUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_VIDEO_MODEL",
"prompt": "A blue ceramic cup on a wooden table as morning light moves across the scene",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'Fields other than model and prompt are examples. If the plugin configures seconds as the upstream duration field, send seconds instead of duration. Omit resolution or aspect ratio when the model does not support them. With strict-field validation enabled, unconfigured fields are rejected. Save the returned id immediately. HTTP 200 means the task was accepted, not that the video is ready.
Query the task with the same Xuo key:
curl "https://api.xuo.cc/v1/videos/YOUR_TASK_ID" \
-H "Authorization: Bearer $XUO_API_KEY"Common statuses include queued, pending, processing, in_progress, completed, and failed. Poll every 5–10 seconds. On success, video_url points to the gateway's content endpoint. You can also request it directly:
curl "https://api.xuo.cc/v1/videos/YOUR_TASK_ID/content" \
-H "Authorization: Bearer $XUO_API_KEY" \
--output result.mp4If submission times out or the connection drops, check the task and Usage Logs before doing anything else. Do not automatically resubmit the creation request, as that can generate and bill a duplicate. The gateway does not provide a generic active task-cancellation endpoint. Check Usage Logs for settlement after a failed or cancelled task.
Reference media and model configuration
Reference-media fields are not universal. The OpenAI-compatible video plugin can declare reference images, videos, audio, first/last frames, audio generation, and per-model item limits. Send only fields configured for that model and supported by its upstream. Reference URLs generally need to be HTTPS media files directly accessible to the upstream; share pages, login-protected URLs, and private local addresses usually do not work.
For example, if wan4-wan3.0 is enabled for the key, its supplied documentation lists resolutions 480P, 720P, and 1080P; aspect ratios include adaptive, 16:9, 9:16, 1:1, 4:3, and 3:4; and duration ranges from 2 to 30 seconds. Preserve the exact case required by the upstream. Check each other model's documentation separately.
Check charges
Image charges may depend on image count, size, quality, and group ratios. Video may be billed per task, per second, or by resolution tier. These examples are not price quotes. Check model pricing before calling, then verify the model, group, request parameters, and charge in Usage Logs.
