Skip to content

Going to production

  • One key per environment and per service, named so you can tell them apart. Revoking one never affects the others.
  • Keys only on your server, never in a browser, a mobile app or a repository. Read them from REMODELED_API_KEY or your secret store.
  • A credit limit on each key that matches its budget for 30 days. A leaked key can never spend more than that. A limit of 0 makes a read-only key.
  • Choose a quality on purpose. Quick costs 2 credits, Standard 5 and Best 12 (pricing). Quick is good for previews, with Best only for the image a customer keeps.
  • Watch GET /public/v1/account: credits.available for the account, and key.creditsLeft for this key. Alert before either runs out, and handle 402 insufficient_credits and 402 key_limit_reached with a clear message to your users.
  • Failed designs are refunded automatically (creditsCharged: 0). There is nothing to reconcile.
  • Send an Idempotency-Key with every design start, made from your own ids (for example listing-4471-photo-3). Then a retry, a crash or a double click never pays twice. The SDKs add a random one if you don’t.
  • Retry 429 after Retry-After, and 5xx with backoff. The SDKs do this (2 retries by default; maxRetries / max_retries).
  • Don’t retry 4xx other than 429: the request itself needs fixing. error.code says what is wrong (errors).
  • Use a webhook for anything that runs without a person waiting. Check the signature, answer within 5 seconds, and skip event ids you have seen.
  • Copy images you keep to your own storage.
  • Keep your own record of design ids, or put your ids in metadata, so you can match results to your data.
  • Stay within 120 requests a minute and 20 design starts a minute per key (rate limits). Use several keys for more, or write to us.
  • Use Prefer: wait or webhooks rather than polling in a tight loop.
  • Log X-Request-Id from every error answer (requestId in the TypeScript SDK, request_id in Python). Quote it when you write to support and we can find the exact request.