POST /humanize request without creating a second job. When a request times out or a connection drops, you often can’t tell whether the server received it. Retrying blindly risks submitting the same text twice, which creates a duplicate job and charges API words a second time. An idempotency key removes that risk: Wibble recognizes the repeated request and returns the original job instead of starting a new one.
The Idempotency-Key header
To make a submission retry-safe, send anIdempotency-Key header on POST /humanize. The key is a string of up to 256 characters that you choose.
Generate one key per logical request and reuse it across every retry of that request. A version 4 UUID works well because it’s unique without coordination.
The key identifies the request, not the text. Use a fresh key for each new submission you want to process, even when the text is identical.
Behavior
Wibble compares the key and the request body to decide how to respond.| Key | Body | Response |
|---|---|---|
| New | Any | 202 — a new job is created. |
| Reused | Identical | 200 — the original job is returned, with no new job and no additional words reserved. |
| Reused | Different (within 24 hours) | 409 idempotency_conflict. |
200 rather than 202 because the job already exists. The job object is the same one your first request created, so you can read its id and status exactly as you would on the first call.
Conflicts
If you reuse a key with a different body within the retention window, Wibble returns409 idempotency_conflict. This protects you from accidentally attaching two different submissions to the same key. The response names the job the key already belongs to and when the key frees up.
Retention
Wibble retains each idempotency key for 24 hours, starting from the first request that used it. During that window, a matching retry returns the original job. After it expires, the key is forgotten: the same key with the same body starts a new job, and any prior conflict clears.Example
This submit includes anIdempotency-Key. If the call fails partway, you can run the exact same request again and get the same job back rather than a duplicate.
202 and creates a job:
7b42f1d6-0a8c-4e8f-9a21-c6d9f47c2b10 with HTTP 200. No second job is created, and no additional words are reserved.
Related
Submit a job
Every request option for
POST /humanize, including the Idempotency-Key header.Errors
The
idempotency_conflict response and the full error reference.