Developer Docs/Image Editor API

Image Editor API

Build Image Editor integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

AI-powered image editing including inpainting, outpainting, and prompt-guided modifications to existing images. Preserve context while making targeted changes.

Primary Endpoint

POST/api/v1/userImageEdit/start

Start image editing task

Request Parameters

NameTypeRequiredDescription
namestringNoName of the image edit task
edit_typeenum: clothing | productYesType of edit to perform
image_urlsarray<string>YesArray of image URLs to edit (minimum 2)
timeoutnumberNoProcessing timeout in seconds
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/userImageEdit/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Clothing Edit",
  "edit_type": "clothing",
  "image_urls": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "timeout": 120,
  "webhook_url": "https://your-server.example.com/a2e/webhook",
  "webhook_token": "a-shared-secret"
}'

Related Endpoints

POST/api/v1/userImageEdit/start

Start image editing task

GET/api/v1/userImageEdit/allRecords

Get all task records

POST/api/v1/userImageEdit/batchDetail

Batch query task details

GET/api/v1/userImageEdit/{_id}

Get task details

DELETE/api/v1/userImageEdit/{_id}

Delete task

Responses

200

Image edit task started successfully

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid or missing bearer token