Skip to content

Hidream O1 Image · Edit

Integrate

Model id hidream-o1-image/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hidream-o1-image/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: $0.04 40 API credits Run it on this page

Get API key
HiDream Image Editing Reference inputs

Full-quality reference-image editing and subject personalization, up to about 2048x2048, 50 steps

HiDream · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Text instructions for generating or editing images, or for subject-driven personalization.

•required reference_image_urls
Drop a file, or

Images supplied as references for editing or subject-driven personalization.

image_size default {"height":2048,"width...

Choose image dimensions; for outputs based on reference images, this request is matched to the closest resolution the model supports, with an approximate maximum of 2048 × 2048 pixels.

num_images default 1

Count of images to produce.

Advanced output_format · num_inference_steps · guidance_scale · seed · enable_safety_checker · keep_original_aspect
output_format default png

File format for the resulting image.

default 50

Count of denoising steps to perform.

default 5

Scale for classifier-free guidance; defaults to 5.0 for the full model.

Random seed that makes generation reproducible.

POST /run/hidream-o1-image/edit?wait=20 quote → $0.04
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hidream-o1-image/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Hidream O1 Image · Edit

Edits images or builds subject-driven results from one or more reference images (`reference_image_urls`) plus a text `prompt`. Output size uses presets or a custom size, up to roughly 2048x2048. Defaults to 50 denoising steps with guidance 5, and can return 1 to 4 images as PNG, JPEG or WebP. `keep_original_aspect` preserves the aspect ratio when a single reference is given.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Text instructions for generating or editing images, or for subject-driven personalization.
reference_image_urlsrequired images
Typeurl[] · image
Images supplied as references for editing or subject-driven personalization.
image_sizeoptional
Typeobject
Default{"height":2048,"width":2048}
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Choose image dimensions; for outputs based on reference images, this request is matched to the closest resolution the model supports, with an approximate maximum of 2048 × 2048 pixels.
num_inference_stepsoptional
Typeinteger
Default50
1 – 50
Count of denoising steps to perform.
guidance_scaleoptional
Typenumber
Default5
0 – 20
Scale for classifier-free guidance; defaults to 5.0 for the full model.
seedoptional
Typeinteger | null
Random seed that makes generation reproducible.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Count of images to produce.
output_formatoptional
Typeenum
Defaultpng
jpegpngwebp
File format for the resulting image.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Controls whether generated images undergo safety checking.
keep_original_aspectoptional
Typeboolean
Defaultfalse
Aspect-ratio retention for single-reference generation: the output matches that reference's proportions only when exactly one image is supplied.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "hidream-o1-image/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 40,
    "usd": "0.04",
    "charged": 40,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string",
    "timings": {}
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}Images produced by generation.
seed
integerSeed value applied during generation.
has_nsfw_concepts
array of booleanSafety-checker flag status for each generated image.
prompt
stringPrompt that was used to generate the output.
timings
objectTiming measurements for generation.

More models: Image Editing

For AI agents: this page as Markdown is at https://doitong.com/developers/models/hidream-o1-image/edit.md. All models and guides: https://doitong.com/developers/llms.txt