Model API

Flux 2 Lora Gallery

Virtual clothing try-on (2 images: person + garment)

Model id

Use this in every request
flux-2-lora-gallery/virtual-tryon

Run it

Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-2-lora-gallery/virtual-tryon",
  "input": {
    "image_urls": [
      "https://example.com/input.png"
    ],
    "prompt": "A red ceramic cup on a wooden table, soft morning light"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "flux-2-lora-gallery/virtual-tryon", "quote_id": "QUOTE_ID", "input": {"image_urls":["https://example.com/input.png"],"prompt":"A red ceramic cup on a wooden table, soft morning light"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Input

Input fields for flux-2-lora-gallery/virtual-tryon
NameTypeDescription
image_urlsrequiredarray of image URLs
The URLs of the images for virtual try-on. Provide person image and clothing image.
promptrequiredstring
The prompt to generate a virtual try-on image.
image_sizestring (enum)
The size of the generated image. If not provided, the size of the input image will be used.

One of: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9

guidance_scalenumber
The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt.

Default: 2.5

num_inference_stepsinteger
The number of inference steps to perform.

Default: 40

accelerationstring (enum)
Acceleration level for image generation. 'regular' balances speed and quality.

Default: regular

One of: none, regular

seedinteger
Random seed for reproducibility. Same seed with same prompt will produce same result.
sync_modeboolean
If `True`, the media will be returned as a data URI and won't be saved in history.

Default: false

output_formatstring (enum)
The format of the output image

Default: png

One of: png, jpeg, webp

num_imagesinteger
Number of images to generate

Default: 1

lora_scalenumber
The strength of the virtual try-on effect.

Default: 1

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"outputs": [
  { "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]

Pricing

  • per megapixel$0.0333/ megapixel

The exact charge for your input comes from a quote. How charges settle