---
title: "Seedream 4 - Edit image"
method: POST
path: "/v1/ai/text-to-image/seedream-v4-edit"
tags: ["text-to-image"]
---

# Seedream 4 - Edit image

`POST /v1/ai/text-to-image/seedream-v4-edit`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/text-to-image/seedream-v4-edit`
- Auth: API key in header `x-magnific-api-key`

Convert descriptive text input into images using AI. This endpoint accepts a variety of parameters to customize the generated images.

## Request body

- TtisdEditRequestContent
  - `prompt` string, required: The text prompt used to generate the image
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
  - `aspect_ratio` 'square_1_1' | 'widescreen_16_9' | 'social_story_9_16' | 'portrait_2_3' | 'traditional_3_4' | 'standard_3_2' | 'classic_4_3': The aspect ratio of the generated image
  - `guidance_scale` number: Controls how closely the output image aligns with the input prompt. Higher values mean stronger prompt correlation.
  - `seed` integer: Random seed to control the stochasticity of image generation
  - `reference_images` string[]: Optional array of reference images for image editing. Each image can be provided as a Base64 encoded string or a publicly accessible URL. Maximum of 5 reference images allowed. If provided, the model will use these images as reference for editing or style transfer.

## Response `200`

OK - The request has succeeded and the Seedream v4 edit process has started.

- GetStyleTransferTaskStatus200Response
  - `data` TaskDetail, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
