ReWords.AI API

An edit finished

Sent to callback_url when an edit reaches succeeded or failed. The body is the same as GET /edits/{id}. Verify X-Rewords-Signature: sha256=<64 hex characters: HMAC-SHA256 of the raw body with your webhook secret>. The webhook secret belongs to your account (one for all keys) and can be reset on the API keys page.

Any response other than 2xx within 10 seconds counts as failed. A failed delivery is retried 1, 5 and 30 minutes after the previous attempt (the last one about 36 minutes after the first); after that we stop, and GET /edits/{id} still returns the result. Every retry sends the same bytes with the same signature. A delivery can arrive more than once, so ignore an id you have already handled.

Header Parameters

X-Rewords-Signature*string
Match^sha256=[0-9a-f]{64}$

Request Body

application/json
  1. body
id*string
status*string
Value in"queued""processing""succeeded""failed"
queue_position?integer

While queued: jobs waiting ahead of this one. Jobs already running are not counted, so 0 means next to start.

estimated_seconds?integer

While queued, our estimate of the seconds until this job will finish.

results?
replacements?array<>

Replacements as applied: one item per line that is changed, with the box we located and the line's full text in from and to. Items keep the order of your request; a replacement that matched several lines becomes several items, top to bottom.

charged?integer

Edits charged (1 when A or B succeeded, otherwise 0).

balance?integer

Edits left on the account when this response was made — the same as edits_remaining in GET /account (edits reserved for unfinished jobs, including this one, are already taken off).

error?

Present when failed. code is one of content_blocked, ai_generation_failed, timeout, upstream_failed or invalid_image (the file passed the upload checks but could not be decoded).

created_at?string
Formatdate-time
completed_at?string
Formatdate-time

Response Body

Return any 2xx within 10 seconds to acknowledge.

Example Requests
POST/editCompleted
Request Body
application/json
{  "id": "edit_9f8e7d",  "status": "succeeded",  "results": {    "A": {      "status": "succeeded",      "url": "https://img.rewords.ai/api/edit_9f8e7d_a.jpg"    },    "B": {      "status": "succeeded",      "url": "https://img.rewords.ai/api/edit_9f8e7d_b.jpg"    },    "C": {      "status": "skipped",      "reason": "aspect_ratio_unsupported"    }  },  "replacements": [    {      "from": "SALE",      "to": "HOT DEAL",      "box": [        120,        80,        300,        60      ]    }  ],  "charged": 1,  "balance": 299,  "created_at": "2026-11-04T10:00:00Z",  "completed_at": "2026-11-04T10:01:12Z"}
Header Parameters
{  "X-Rewords-Signature": "sha256=4df15417117b648c72e2a97d528973c3cf83dd05fae0bbf139b18c121cdd9386"}