Skip to content

Image assets ​

Reuse images in editing, image-to-image generation or video references. Use stable public URLs where the model accepts them; a model asset reference is optional or unsupported depending on the model.

Upload a local file ​

bash
curl https://moonnexai.com/v1/assets/uploads \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -F "file=@./reference.png" \
  -F "type=image" \
  -F "purpose=video_reference" \
  -F "mode=oss"

This creates a MoonNexAI OSS test URL. OSS is for testing and has no long-term retention or availability guarantee; use your own storage for production media.

Model references ​

When a model requires an asset reference, send the actual target model and mode=asset in the upload request and save the returned asset_id. While it is syncing, query details for the same ID; detail queries attempt to synchronize the preparation already submitted. On failure, inspect sync_error instead of repeatedly uploading or proceeding with generation.

Before using an asset reference, require status=ready, preparation_status=ready and generation_ready=true, and confirm that the model selected during upload supports the reference. review_status / review_passed provide additional status information; they do not replace readiness. Resolve a reported review failure or error first. An available OSS URL does not establish Asset:// support for every model.

Explicitly put the returned URL or supported Asset://asset_xxx in each generation request. See uploads, queries, advanced options and image editing.