Classic distributed-systems problem, social media edition:

  1. script sends “create post”
  2. server creates it, response is slow
  3. client times out, retries
  4. two identical posts on the brand account

The GPTpost API accepts an Idempotency-Key header on create calls: a retry with the same key returns the original post.

What we have settled on:

  • key = logical identity of the post (slot + account), never a timestamp
  • same key for every retry of that post
  • a local state file so re-runs skip completed work
  • on 429, wait for Retry-After, retry with the same key

Docs: https://oraglegpt.org/use-cases/social-media-api/

How do you derive idempotency keys in your own systems? Hash of the payload, or a business identifier?

https://oraglegpt.org/use-cases/social-media-api/