Skip to main content
POST
Image-to-Image
The dimensions of the generated image will be the same as the dimensions of the init_image.
Transform existing images with text guidance using the HiDream O1 model.

Request

Make a POST request to the endpoint below with the required parameters.

Body

json

Body

application/json
key
string
required

Your API Key used for request authorization.

model_id
string
required

The ID of the model to be used. Use hidream-o1 for the HiDream O1 model.

prompt
string
required

A text description of what you want in the generated image.

init_image
string<uri>
required

URL of the initial image to be used as a reference.

negative_prompt
string

Items you don't want in the image.

strength
number
default:0.7

How much to transform the init image. 0.0 = no change, 1.0 = complete transformation.

Required range: 0 <= x <= 1
width
integer
default:2048

The width of the image in pixels. Must be between 1024-2048 and divisible by 8.

Required range: 1024 <= x <= 2048
height
integer
default:2048

The height of the image in pixels. Must be between 1024-2048 and divisible by 8.

Required range: 1024 <= x <= 2048
samples
integer
default:1

The number of images to be returned in response. Maximum is 4.

Required range: x <= 4
num_inference_steps
integer
default:30

Number of denoising steps. Higher values produce more detailed images but take longer.

Required range: 20 <= x <= 50
guidance_scale
number
default:7.5

How closely to follow the prompt. Higher values = more literal interpretation.

Required range: 1 <= x <= 20
safety_checker
enum<string>
default:yes

Enable NSFW content filter.

Available options:
yes,
no
seed
integer | null

Random seed for reproducible results. Pass null for a random number.

webhook
string<uri>

URL to receive a POST API call once image generation is complete.

track_id
string

Unique ID used in webhook response to identify the request.

Response

Image-to-image generation response

status
enum<string>

Status of the image generation.

Available options:
success
generationTime
number

Time taken to generate the image in seconds.

id
integer

Unique identifier for the image generation request.

output
string<uri>[]

Array of generated image URLs.

Array of proxy image URLs.

meta
object

Metadata about the image generation including all parameters used.

nsfw_content_detected
boolean

Indicates if NSFW content was detected in the generated image.

webhook_status
string

Status of the webhook notification.

tip
string

Additional information or tips for the user.