image_to_image
Modifies an input image according to a text prompt, enabling style transfer, seasonal changes, or other transformations using AI.
Instructions
Generate an image from an existing image using WaveSpeed AI.
Args:
image (str): Required. URL, base64 string, or local file path of the input image to modify.
images (List[str]): Required. List of URLs to images to modify.
prompt (str): Required. Text description of the desired modifications. MUST BE IN ENGLISH. Non-English prompts will be rejected or result in poor quality outputs.
model (str, optional): Model to use for image generation.
guidance_scale (float, optional): Guidance scale for text adherence. Controls how closely the output follows the prompt. Range: [1.0-10.0]. Default: 3.5.
enable_safety_checker (bool, optional): Whether to enable safety filtering. Default: True.
output_directory (str, optional): Directory to save the generated images. Uses a temporary directory if not provided.
request_id (str, optional): Request correlation ID for tracing the entire request chain. Strongly recommended to provide a unique ID (e.g., UUID) to correlate logs across the request lifecycle.
Returns:
WaveSpeedResult object with the result of the image generation, containing:
- status: "success" or "error"
- urls: List of image URLs if successful
- base64: List of base64 encoded images if resource_mode is set to base64
- local_files: List of local file paths if resource_mode is set to local
- error: Error message if status is "error"
- processing_time: Time taken to generate the image(s)
Examples:
Single image: image_to_image(image="https://example.com/image.jpg", images=[], prompt="Make it look like winter")
Multiple images: image_to_image(image="", images=["https://example.com/img1.jpg", "https://example.com/img2.jpg"], prompt="Convert to oil painting style")
Both parameters: image_to_image(image="https://example.com/main.jpg", images=["https://example.com/ref1.jpg"], prompt="Apply style transfer")
Note:
For optimal results, always provide prompts in English, regardless of your interface language.
Non-English prompts may result in lower quality or unexpected images.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| images | Yes | ||
| prompt | Yes | ||
| model | No | ||
| guidance_scale | No | ||
| enable_safety_checker | No | ||
| output_directory | No | ||
| request_id | No |