Image to image
chatular-image-apiSend a picture and say what to change.
- Address
POST /api/image/image-to-image- Input
- Text and picture
- Output
- Picture
curl https://api.chatular.ai/api/image/image-to-image \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":"Make the sneakers white","image":{"base64":"iVBORw0KGgo…"}}'The answer, with the changed picture
{
"pictures": [
{
"id": "k3J9…",
"prompt": "A perfume poster, Velvet Night, new scent",
"shape": "tall",
"width": 576,
"height": 1024,
"createdAt": 1793491200000,
"file": "/api/image/k3J9…/file"
}
],
"failed": 0
}What you send
| Field | Type | What it is |
|---|---|---|
prompt | string | What to change, in any language, up to 2,500 characters. Required. |
image | object | The picture to change, { base64 }: PNG, JPEG or WebP under 10 MB. Required. |
shape | string | square, portrait, tall or wide. Leave it out and the picture keeps its own shape. Another shape can crop it. |
count | number | How many pictures, 1 to 4. The default is 1. |

