Skip to main content
Endpoint: POST https://fal.run/fal-ai/bytedance/dreamina/v3.1/text-to-image Endpoint ID: fal-ai/bytedance/dreamina/v3.1/text-to-image

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/bytedance/dreamina/v3.1/text-to-image",
    arguments={
        "prompt": "A 25-year-old korean woman selfie, front facing camera, lighting is soft and natural. If background is visible, it's a clean, modern apartment interior. The clothing color is clearly visible and distinct, adding a hint of color contrast"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Input Schema

prompt
string
required
The text prompt used to generate the image
image_size
ImageSize | Enum
default:"[object Object]"
The size of the generated image. Width and height must be between 512 and 2048.Possible values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9
enhance_prompt
boolean
default:"false"
Whether to use an LLM to enhance the prompt
num_images
integer
default:"1"
Number of images to generate Default value: 1Range: 1 to 4
seed
integer
Random seed to control the stochasticity of image generation.
sync_mode
boolean
default:"false"
If True, the media will be returned as a data URI and the output data won’t be available in the request history.

Output Schema

images
list<Image>
required
Generated images
seed
integer
required
Seed used for generation

Input Example

{
  "prompt": "A 25-year-old korean woman selfie, front facing camera, lighting is soft and natural. If background is visible, it's a clean, modern apartment interior. The clothing color is clearly visible and distinct, adding a hint of color contrast",
  "image_size": {
    "width": 2048,
    "height": 1536
  },
  "enhance_prompt": false,
  "num_images": 1,
  "sync_mode": false
}

Output Example

{
  "images": [
    {
      "url": "https://v3.fal.media/files/panda/4mddd7PmDvbbBZDs-xnUW_4294a9041c9d46eaa7b98d15ce6300fb.png"
    }
  ],
  "seed": 746406749
}

Limitations

  • image_size restricted to: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9
  • num_images range: 1 to 4