Passer au contenu principal
POST
/
image
/
multi-edit
/api/v1/image/multi-edit
curl --request POST \
  --url https://api.venice.ai/api/v1/image/multi-edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "images": [
    "<string>"
  ],
  "aspect_ratio": "16:9",
  "modelId": "firered-image-edit",
  "output_format": "png",
  "quality": "high",
  "resolution": "1K",
  "safe_mode": false
}
'
"<string>"
Tarification : Le prix de l’édition multi-images varie selon le modèle. Voir l’aperçu de la tarification pour les prix actuels par édition.

Niveaux de qualité

Certains modèles d’édition multi-images acceptent un paramètre quality optionnel (low, medium, high) qui arbitre entre fidélité visuelle et coût. Actuellement pris en charge par gpt-image-2-edit ; les autres modèles ignorent ce paramètre.
{
  "modelId": "gpt-image-2-edit",
  "images": ["iVBORw0KGgo...", "iVBORw0KGgo..."],
  "prompt": "blend the two scenes into one cinematic frame",
  "resolution": "2K",
  "quality": "medium"
}
Lorsque vous omettez quality, le modèle utilise son niveau par défaut (high pour gpt-image-2-edit). Les prix par niveau (1K/2K/4K × low/medium/high) se trouvent sous model_spec.pricing.quality dans l’endpoint Models et sont listés dans l’aperçu de la tarification.
La tarification consciente de la qualité est la valeur par défaut pour tous les appelants de l’API et du SDK — aucun en-tête d’opt-in requis. Les requêtes qui omettent quality sont facturées au niveau par défaut du modèle (high pour gpt-image-2-edit).

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

Edit an image by compositing up to three layered images with a single prompt. Supports base64-encoded strings and URLs.

prompt
string
requis

The text directions to edit or modify the image. Short, descriptive prompts work best (e.g., "remove the tree", "change the sky to sunrise"). Character limit is model specific and is listed in the promptCharacterLimit setting in the model list endpoint.

Required string length: 1 - 32768
images
(string<uri> | string)[]
requis

Array of 1 to 3 images used for multi-editing. The first image is treated as the base image, and the remaining images are used as edit layers/masks. Each image can be a base64-encoded string or a URL starting with http:// or https://. Image dimensions must be at least 65536 pixels and must not exceed 33177600 pixels. File size must be less than 25MB.

Required array length: 1 - 3 elements

Image as a base64-encoded string or a URL starting with http:// or https://

aspect_ratio
enum<string>

The aspect ratio for the output image. Use 'auto' or omit this parameter to infer the closest supported aspect ratio from the first input image when explicit sizing is required by the model.

Options disponibles:
auto,
1:1,
3:2,
16:9,
21:9,
9:16,
2:3,
3:4,
4:5
Exemple:

"16:9"

modelId
enum<string>
défaut:firered-image-edit

The model ID to use for multi-edit.

Options disponibles:
firered-image-edit,
qwen-edit,
qwen-edit-uncensored,
grok-imagine-edit,
grok-imagine-quality-edit,
qwen-image-2-edit,
qwen-image-2-pro-edit,
wan-2-7-pro-edit,
flux-2-max-edit,
gpt-image-2-edit,
gpt-image-1-5-edit,
nano-banana-2-edit,
nano-banana-pro-edit,
seedream-v5-lite-edit,
seedream-v4-edit
Minimum string length: 1
output_format
enum<string>

Output format for the edited image. Accepts jpeg, jpg, png, or webp. When omitted, the format is inferred from resolution: PNG for 1K edits and JPEG for 2K/4K edits.

Options disponibles:
jpeg,
png,
webp
Exemple:

"png"

quality
enum<string>

Output quality for supported models (e.g. GPT Image 2 / GPT Image 2 Edit). Higher values can increase the final request charge. See the model list for supported options.

Options disponibles:
low,
medium,
high
Exemple:

"high"

resolution
string

Resolution tier for the output image (e.g. "1K", "2K", "4K"). Supported values vary by model - check GET /api/v1/models for model-specific options. Defaults to "1K" when not specified.

Required string length: 1 - 10
Exemple:

"1K"

safe_mode
boolean
défaut:true

Whether to use safe mode. If enabled, this will blur images that are classified as having adult content.

Exemple:

false

Réponse

OK

The response is of type file.