API

Idempotency.

Every POST /v1/erase requires an Idempotency-Key. Retries are safe and never double-charge.

How it works

The key is scoped to your API key and endpoint. The first request stores a hash of the body and the response. A retry with the same key and body returns the stored response with Idempotent-Replayed: true.

cURL
curl https://api.erasa.app/v1/erase \
  -H "Authorization: Bearer $ERASA_KEY" \
  -H "Idempotency-Key: 7c1e..." \
  -F image=@street.jpg \
  -F prompt="power lines"

Rules

  • Keys are 8–255 characters: [A-Za-z0-9._:-].
  • Same key + different body returns 409 idempotency_key_reuse.
  • Concurrent requests return 409 idempotency_in_progress; retry after 1s.
  • Records expire after 24 hours.

Response header

HTTP
Idempotent-Replayed: true
Generate a UUID per logical request, not per HTTP attempt. Retries should reuse the same key.