Image To Image
image_to_imageTransform an existing image using a text prompt.
Modifies images based on text descriptions. Useful for style transfer and editing. Accepts images as URLs (preferred), data URIs (data:image/...;base64,...), or base64 strings. When a URL is available (e.g., from a previous text_to_image result), always prefer passing the URL directly.
Pass either image for a single source or images for up to five; the API
rejects a request carrying both.
Available models:
Flux_2_Klein_4B_BF16: steps=4 (fixed), size=256-1536x256-1536, up to 3 input image(s), no negative_promptQwenImageEdit_Plus_NF4: steps=1-50 (default 40), size=256-1024x256-1024, output size = input size, up to 1 input image(s)gpt-image-2.6(test model): size=640-3840x640-3840, w/h rounded down to a multiple of 16, ≤8.29Mpx, side≤3840, aspect≤3, up to 5 input image(s), quality: low|medium|high|auto (default medium), no negative_promptnano-banana-2.1(test model): size=352-11712x352-11712, w/h rounded down to a multiple of 16, ≤17.20Mpx, side≤11712, aspect≤8.4, up to 5 input image(s), no negative_promptgpt-image-2.5(test model): size=640-3840x640-3840, w/h rounded down to a multiple of 16, ≤8.29Mpx, side≤3840, aspect≤3, up to 5 input image(s), quality: low|medium|high|auto (default high), no negative_promptgpt-image-2(test model): size=512-2048x512-2048, output size = input size, up to 2 input image(s), quality: low|medium|high|auto (default medium), no negative_promptgpt-image-1.5(test model): size=1024-1536x1024-1536, output size = input size, up to 2 input image(s), quality: low|medium|high (default medium), no negative_prompt Models marked (test model) are experimental: they may change or disappear. Prefer an unmarked model unless the caller asks for one of them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"model": "<model>"
},
"name": "image_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducibility | |
| image | No | Source image as URL (e.g., from text_to_image result), data URI (data:image/png;base64,...), or base64 string. IMPORTANT: Pass the image directly without displaying or printing the base64 data. | |
| loras | No | List of LoRA models (optional, e.g., [{'name': 'style_lora', 'weight': 0.75}]) | |
| model | Yes | AI model name for image transformation | |
| steps | No | Number of diffusion steps. Defaults to the model's own value (see the model list) | |
| width | No | Output width in pixels. Defaults to the first input image's size; ignored by models that keep the input size (Qwen, gpt-image-1.5/2) | |
| height | No | Output height in pixels. Defaults to the first input image's size; ignored by models that keep the input size (Qwen, gpt-image-1.5/2) | |
| images | No | Several source images to edit together, each a URL, data URI or base64 string. How many a model takes is 'up to N input image(s)' in the model list (the API caps it at 5). Mutually exclusive with 'image' | |
| prompt | Yes | Text description of desired transformation | |
| quality | No | Quality tier for models that price by tier, e.g. 'low', 'medium', 'high'. Costs vary sharply between tiers | |
| webhook_url | No | HTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here | |
| enhance_prompt | No | Let the API expand the prompt before generating | |
| guidance_scale | No | How closely to follow the prompt. Leave unset to use the model's own default | |
| webhook_secret | No | 32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript | |
| negative_prompt | No | Things to exclude from the transformed image (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||