LogoLogoAPI Docs
LogoLogoAPI Docs
Homepage
OverviewAuthentication and idempotencyImage generationsImage editsImage conversionsJobs and bounded waitingCreditsErrorsRate limits and concurrencyAPI changelog
API Docs

Image edits

Edit an uploaded image with natural-language instructions

POST /api/v1/images/edits accepts multipart/form-data. Required scope: images:edit.

Form fields

FieldTypeRequiredDefaultRules
imagefileyes—PNG, JPEG, or WebP; maximum 10 MiB and 40 million decoded pixels
promptstringyes—Editing instruction, 5–2,000 characters
aspect_ratiostringnosource-dependentSame public ratios as generation
resolutionstringno2K2K or 4K
countintegerno11–4

File signatures are checked independently of the declared MIME type. Invalid, oversized, or unsafe images return 400 INVALID_REQUEST or HTTP 413 with the same public code.

Credits

ResolutionCredits per output
2K10
4K20

cURL

curl https://sci-draw.com/api/v1/images/edits \
  -H 'Authorization: Bearer sd_YOUR_KEY' \
  -H 'Idempotency-Key: revise-figure-7-v2' \
  -F 'image=@figure.png;type=image/png' \
  -F 'prompt=Move the legend below the diagram and increase label contrast' \
  -F 'resolution=2K' \
  -F 'count=1'

JavaScript

const form = new FormData();
form.set('image', file);
form.set('prompt', 'Move the legend below the diagram');
const response = await fetch('https://sci-draw.com/api/v1/images/edits', {
  method: 'POST',


Python

with open("figure.png", "rb") as image:
    response = requests.post(
        "https://sci-draw.com/api/v1/images/edits",
        headers={"Authorization": f"Bearer 


The uploaded source is private job input and is never returned in job or log responses. Duplicate idempotent uploads are discarded; accepted sources are removed after a terminal result.

Image generations

Create prompt-to-image jobs

Image conversions

Convert images to SVG, PPTX, PNG, PDF, or TIFF

Table of Contents

Form fields
Credits
cURL
JavaScript
Python
headers: { Authorization: `Bearer ${apiKey}`, 'Idempotency-Key': crypto.randomUUID() },
body: form,
});
{
api_key
}
"
,
"Idempotency-Key"
:
str
(uuid.uuid4())},
files={"image": ("figure.png", image, "image/png")},
data={"prompt": "Move the legend below the diagram"},
)