API reference for Bytedance Seedream V4. A new-generation image creation model ByteDance, Seedream 4.0 integrates image generation and image editing capabilities into a single, unified architecture.
import fal_clientdef 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/seedream/v4/edit", arguments={ "prompt": "Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building.", "image_urls": [ "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_1.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_2.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_3.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_4.png" ] }, with_logs=True, on_queue_update=on_queue_update,)print(result)
The size of the generated image. The minimum total image area is 921600 pixels. Failing this, the image size will be adjusted to by scaling it up, while maintaining the aspect ratio.Possible values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, auto, auto_2K, auto_4K
If set to a number greater than one, enables multi-image generation. The model will potentially return up to max_images images every generation, and in total, num_images generations will be carried out. In total, the number of images generated will be between num_images and max_images*num_images. The total number of images (image inputs + image outputs) must not exceed 15 Default value: 1Range: 1 to 6
The mode to use for enhancing prompt enhancement. Standard mode provides higher quality results but takes longer to generate. Fast mode provides average quality results but takes less time to generate. Default value: "standard"Possible values: standard, fast
{ "prompt": "Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building.", "image_size": { "height": 2160, "width": 3840 }, "num_images": 1, "max_images": 1, "sync_mode": false, "enable_safety_checker": true, "enhance_prompt_mode": "standard", "image_urls": [ "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_1.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_2.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_3.png", "https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_4.png" ]}
import fal_clientdef 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/seedream/v4/text-to-image", arguments={ "prompt": "A trendy restaurant with a digital menu board displaying \"Seedream 4.0 is available on fal\" in elegant script, with diners enjoying their meals." }, with_logs=True, on_queue_update=on_queue_update,)print(result)
The size of the generated image. Total pixels must be between 960x960 and 4096x4096.Possible values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, auto, auto_2K, auto_4K
If set to a number greater than one, enables multi-image generation. The model will potentially return up to max_images images every generation, and in total, num_images generations will be carried out. In total, the number of images generated will be between num_images and max_images*num_images. Default value: 1Range: 1 to 6
The mode to use for enhancing prompt enhancement. Standard mode provides higher quality results but takes longer to generate. Fast mode provides average quality results but takes less time to generate. Default value: "standard"Possible values: standard, fast
{ "prompt": "A trendy restaurant with a digital menu board displaying \"Seedream 4.0 is available on fal\" in elegant script, with diners enjoying their meals.", "image_size": { "height": 4096, "width": 4096 }, "num_images": 1, "max_images": 1, "sync_mode": false, "enable_safety_checker": true, "enhance_prompt_mode": "standard"}