ReWords.AI API

Queue and limits

ReWords.AI API concurrency, the 30-job queue, rate limits for submissions and reads, polling, image size limits, Retry-After and idempotent retries.

Queue

  • Up to 10 jobs per account are processed at the same time.
  • Up to 30 jobs wait in the queue behind them. While a job waits, GET /edits/{id} returns its queue_position (jobs waiting ahead of it; running jobs are not counted, so 0 means next to start) and estimated_seconds (our estimate of when it will finish).
  • When 30 jobs are already waiting, POST /edits returns 503 queue_full with a Retry-After header. You are not charged.
  • A job may run for up to 10 minutes after it leaves the queue. Time spent waiting does not count, so with a full queue the last job can take about 30 minutes in the worst case. Most jobs finish in 1–2 minutes, 9 in 10 within 3 minutes.

Rate limits

Each account, shared by all of its keys, can make in any rolling 60-second window:

RequestsLimit
Submissions: POST /ocr, POST /edits30
Reads: GET /edits/{id}, GET /account240 reads

Every request with a valid key counts, including requests that are rejected with an error. Requests with a missing or invalid key do not count against any account.

Going over returns 429 rate_limited with Retry-After, always a whole number of seconds: the time until the oldest request in the window expires. GET /account returns your current limits in limits. Enterprise accounts can have higher limits.

Polling

  • While a job is processing, or queued with queue_position 0, poll GET /edits/{id} every 5 seconds.
  • While it is queued further back, check again every 30 seconds. estimated_seconds is when the job should finish, not when to check.

With 10 jobs processing and 30 queued that is at most 190 reads a minute, inside the limit of 240. To avoid polling altogether, pass callback_url and receive a webhook.

Images

  • JPEG, PNG or WebP, up to 20 MB, longest side up to 8000 px.
  • Send it as image_url, image_base64, a multipart image file, or an image_id from an earlier OCR call — exactly one of them per request.
  • Up to 20 replacements per edit.

See Images for how to encode each upload method, EXIF, transparency and the result files.

Safe retries

Send an Idempotency-Key header with every POST /edits, so you can safely retry after a timeout or network error. Repeating the same key within 24 hours returns 202 with the original job's id and its current status (it may already be processing or finished) instead of creating — and charging for — a new one, even if the body differs. Keys are per account, shared by all of its API keys. A request that was rejected (any 4xx or 5xx) does not use up its key, so you can resend it with the same key after fixing it.

On this page