# HiDream O1 Dev API

> Hidream O1 Dev by hidream-ai - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.

Source: https://www.sandbase.ai/models/hidream-ai/hidream-o1/dev
API reference: https://www.sandbase.ai/models/hidream-ai/hidream-o1/dev/docs

## Facts

- Provider: HiDream
- Type: Image model
- Model ID: `hidream-ai/hidream-o1/dev`
- Price: $0.02 per run
- Capabilities: text to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "hidream-ai/hidream-o1/dev",
  "images": [
    "https://static.sandbase.ai/examples/hidream-ai/hidream-o1/dev/input_reference_image_urls_0.png"
  ],
  "prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field.",
  "aspect_ratio": "16:9",
  "output_format": "png"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call HiDream O1 Dev through SandBase?

Create a SandBase API key, then send requests with the model ID "hidream-ai/hidream-o1/dev" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate HiDream account?

No. One SandBase API key and balance gives you access to HiDream O1 Dev and the other models in the catalog; you do not need to sign up with HiDream separately.

## README

### HiDream O1 Dev

HiDream O1 Dev generates images from a prompt, or edits when you pass `images`.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | `16:9` | Output shape. |
| `images` | image URL[] | `[]` | Images to edit or combine, Image 1, Image 2, … |
| `seed` | integer | random | Fix it to compare prompt changes. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |

#### Billing

$0.02 per image.

| Request | Price |
|---|---|
| One image | $0.02 |

Failed runs are not charged.

#### Prompting

- Quote any text that must appear.
