Model API
Omnigen V2
OmniGen is a unified image generation model that can generate a wide range of images from multi-modal prompts. It can be used for various tasks such as Image Editing, Personalized Image Generation, Virtual Try-On, Multi Person Generation and more!
Model id
omnigen-v2Run 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": "omnigen-v2",
"input": {
"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": "omnigen-v2", "quote_id": "QUOTE_ID", "input": {"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
| Name | Type | Description |
|---|---|---|
promptrequired | string | The prompt to generate or edit an image. Use specific language like 'Add the bird from image 1 to the desk in image 2' for better results. |
input_image_urls | array of image URLs | URLs of input images to use for image editing or multi-image generation. Support up to 3 images. |
image_size | string (enum) | The size of the generated image. |
num_inference_steps | integer | The number of inference steps to perform. |
seed | integer | The same seed and the same prompt given to the same version of the model will output the same image every time. |
text_guidance_scale | number | The Text Guidance scale controls how closely the model follows the text prompt. Higher values make the model stick more closely to the prompt. |
image_guidance_scale | number | The Image Guidance scale controls how closely the model follows the input images. For image editing: 1.3-2.0, for in-context generation: 2.0-3.0 |
negative_prompt | string | Negative prompt to guide what should not be in the image. |
cfg_range_start | number | CFG range start value. |
cfg_range_end | number | CFG range end value. |
scheduler | string (enum) | The scheduler to use for the diffusion process. |
sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
num_images | integer | The number of images to generate. |
output_format | string (enum) | The format of the generated image. |
Output
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"outputs": [
{ "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]Pricing
- 1 megapixel$0.24/ megapixel
The exact charge for your input comes from a quote. How charges settle