imagineart/imagineart-2.0-edit-preview/image-to-image
Imagineart 2.0 Edit Preview by ImagineArt - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly...
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runimagineart/imagineart-2.0-edit-preview/image-to-imageInput Schema
3 parameters · 1 required · 2 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Editing instruction (e.g. 'replace the background with a sunset beach'). |
images | string[] | Optional | Reference image URL(s). Up to 4 images. |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "imagineart/imagineart-2.0-edit-preview/image-to-image",
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
ImagineArt 2.0 Edit Preview
ImagineArt 2.0 Edit Preview applies written editing instructions to supplied visual references. Its images field accepts up to four URLs, allowing the request to draw on a small reference set rather than being limited to one source.
The prompt can describe a concrete transformation, such as replacing a background, while ten aspect-ratio choices determine the frame of the result. Together, those inputs make the preview endpoint useful for exploring prompt-led revisions across different compositions.
Highlights
Up to four reference images. Bring a compact set of source visuals into one edit request through the images array.
Direct editing instructions. State the intended change in the prompt, including transformations such as replacing the background.
Broad framing selection. Ten supported aspect ratios range from cinematic widescreen to square and portrait layouts.
Prompt-led ImagineArt workflow. The surrounding ImagineArt 2.0 capability is documented around prompt-driven image creation, and this endpoint applies that interaction to image editing.
Pricing
| Billing unit | Price |
|---|---|
| Per request | $0.05 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The model's named workflow matches the source material and intended output | A different input modality or model route is required |
| A managed asynchronous result is suitable for the production pipeline | A synchronous, interactive editor is essential |
| The documented controls cover the required duration, framing, or format | The project needs controls outside this endpoint's schema |
| Creative iteration benefits from a repeatable request structure | Exact deterministic pixels, frames, geometry, or samples are mandatory |
| A finished downloadable media asset is the desired deliverable | Editable source layers or a native project file are required |
Prompt Guide
For generation, state the intended result first, then add the subject or source treatment, progression, style, and delivery constraints. Keep one creative variable per phrase, use the documented field names for controls, and change one setting at a time when comparing results.
{
"aspect_ratio": "21:9",
"images": [
[
"https://example.com/reference.png"
]
],
"prompt": "Describe the desired result with subject, action, setting, and style."
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | imagineart/imagineart-2.0-edit-preview/image-to-image |
| Inputs | aspect_ratio, images, prompt |
| Required inputs | prompt |
| Output fields | content_type, url |
| Execution | Async (submit, then poll for result) |
| Aspect Ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 |

