Ruwana API Examples

Repeatable production recipes built on the live API contracts.

These examples focus on request design, idempotency and predictable billing inputs. They intentionally avoid stock output claims: visual results depend on the supplied brief and media.

Image · Product

Build one 2K catalog image

Use one product reference and one stable logical request key.

curl https://platform.ruwana.studio/v1/lab/product \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: sku-1842-catalog-2k" \
  -F "references[]=@product.webp" \
  -F "prompt=Clean premium catalog composition" \
  -F "resolution=2K" -F "aspect=4:5" -F "count=1"

Current price: $0.17 for one successful 2K Product output.

Image · Creative

Create a four-image campaign batch

Prompt-only Creative can return 1–4 outputs from one logical request.

curl https://platform.ruwana.studio/v1/lab/creative \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: campaign-set-001" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Editorial product still life","resolution":"1K","aspect":"4:5","count":4}'

Four successful 1K prompt-only outputs cost $0.48. With visual references, the same four-output 1K request costs $0.60.

Motion

Transfer movement to a character

Upload the character image and motion video together. Platform derives duration from the motion source.

curl https://platform.ruwana.studio/v1/motion/generate \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: motion-look-001" \
  -F "character_image=@character.png" \
  -F "motion_video=@movement.mp4" \
  -F "resolution=720p"

If the server-derived duration is 8 seconds, 720p costs $1.44 and 1080p costs $1.76.

Avatar

Create a speech-driven presenter

Use one portrait plus speech text. TTS is included in the Avatar rate.

curl https://platform.ruwana.studio/v1/avatar/generate \
  -H "Authorization: Bearer $RUWANA_API_KEY" \
  -H "Idempotency-Key: presenter-001" \
  -F "avatar_image=@portrait.jpg" \
  -F "speech=Welcome to the new collection." \
  -F "resolution=720p" -F "voice=Maya" \
  -F "voice_speed=100" -F "emotion=Confident"

If prepared audio is 8 seconds, Standard 720p costs $0.88 and Pro 1080p costs $1.76.

Need every field and limit?

Use the product documentation for the exact request contract, then the production-readiness guide for retry and archival behavior.