Skip to main content
hidream avatar

HiDream I1 Dev API

hidream/i1-dev

Generate high-quality images from a text prompt with a strong quality-to-speed balance, using the mid-tier 28-step version of HiDream's 17B open image model.

0.03 per megapixel of image

Model Input

Input

The prompt to generate an image from.

The size of the generated image. Use a preset string (e.g. 'landscape_16_9') or a custom {width, height} object.

Min: 1 - Max: 4

The number of images to generate. Each generated image is billed.

The format of the generated image.

Additional Settings

Customize your input with more control.

Describe what you do NOT want to appear in the image.

Min: 1 - Max: 50

The number of inference steps to perform. Defaults to 28 for a balanced quality/speed result; more steps can improve detail at the cost of speed.

The same seed and the same prompt given to the same version of the model will output the same image every time.

Safety checker can only be disabled on API call

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Generated image output
Generated in 8.03 seconds
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2Example output 3Example output 4

HiDream I1 Dev API

HiDream I1 Dev is a text-to-image AI model by hidream. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.03 per megapixel.

POST https://queue.modelrunner.run/hidream/i1-dev

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/hidream/i1-dev \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A bustling neon-lit night market in Kyoto during light autumn rain, reflections of paper lanterns and food stall sign…",
    "image_size": "portrait_4_3",
    "num_images": 1,
    "output_format": "jpeg",
    "negative_prompt": "",
    "num_inference_steps": 28,
    "enable_safety_checker": true,
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/hidream/i1-dev/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/hidream/i1-dev/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("hidream/i1-dev", {
  input: {
    "prompt": "A bustling neon-lit night market in Kyoto during light autumn rain, reflections of paper lanterns and food stall sign…",
    "image_size": "portrait_4_3",
    "num_images": 1,
    "output_format": "jpeg",
    "negative_prompt": "",
    "num_inference_steps": 28,
    "enable_safety_checker": true
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/hidream/i1-dev",
    headers=headers,
    json={
      "prompt": "A bustling neon-lit night market in Kyoto during light autumn rain, reflections of paper lanterns and food stall sign…",
      "image_size": "portrait_4_3",
      "num_images": 1,
      "output_format": "jpeg",
      "negative_prompt": "",
      "num_inference_steps": 28,
      "enable_safety_checker": true
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
promptstringyesThe prompt to generate an image from.
image_sizeenumnoThe size of the generated image. Use a preset string (e.g. 'landscape_16_9') or a custom {width, height} object. Default: "square_hd".
num_imagesintegernoThe number of images to generate. Each generated image is billed. Default: 1.
output_formatenumnoThe format of the generated image. Default: "jpeg".
negative_promptstringnoDescribe what you do NOT want to appear in the image. Default: "".
num_inference_stepsintegernoThe number of inference steps to perform. Defaults to 28 for a balanced quality/speed result; more steps can improve detail at the cost of speed. Default: 28.
seedintegernoThe same seed and the same prompt given to the same version of the model will output the same image every time.
enable_safety_checkerbooleannoIf set to true, the safety checker will be enabled. Default: true.

Machine-readable: OpenAPI schema · llms.txt

Use HiDream I1 Dev from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and HiDream I1 Dev becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint hidream/i1-dev.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run hidream/i1-dev on ModelRunner to generate image”. MCP setup guide.

Model Details

Model Details

HiDream I1 Dev turns a text prompt into a high-quality image with a strong quality-to-speed balance. It is the mid-tier variant of HiDream.ai's 17-billion-parameter open image foundation model, running at 28 inference steps by default - more detail than the Fast tier at a lower cost than the Full tier. Give it a descriptive prompt, pick a size, and it returns one to four finished images.

## Best for - General text-to-image generation where you want good detail without paying for maximum fidelity - AI art, illustrations, and stylized scenes from a text description - Concept art and product renders that need more polish than a quick draft - Marketing and social visuals produced from a short written brief - Producing several variations at once with `num_images` (1-4)

## Choose another model when - You need the fastest, cheapest draft and can trade some detail - use `hidream/i1-fast`, the 16-step speed-optimized variant - You need maximum fidelity and the highest detail - use `hidream/i1-full`, the 50-step full-quality variant (it also adds LoRA support, which Dev does not have) - You want to attach a custom LoRA to steer style - the Dev tier has no LoRA support; use `hidream/i1-full` - You need to edit or restyle an existing photo rather than generate from scratch - use an image-editing model - You need reliably legible in-image text for logos or signage - use a model tuned for typography - You need video - use a text-to-video or image-to-video model

## Tips - Write specific, descriptive prompts; use `negative_prompt` to exclude unwanted elements - The tier defaults to 28 steps for a balanced result; raise `num_inference_steps` (up to 50) for higher fidelity, or lower it for a faster, cheaper draft - `image_size` accepts a preset (`square_hd`, `portrait_16_9`, `landscape_4_3`, ...) or a custom `{width, height}` object; billing is per output megapixel, so larger images cost more - Each image in `num_images` is billed separately

```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("hidream/i1-dev", { input: { prompt: "a red apple on a white table, studio lighting", image_size: "square_hd", num_images: 1, output_format: "jpeg", }, }); ```