Command Palette

Search for a command to run...

Operations

Idempotency

Make POST requests retry-safe and avoid duplicate chat or message creation.

Why It Matters

Networks fail, workers retry, and users double-click. Idempotency keeps repeated POST attempts from creating duplicate chats or repeated assistant actions.

Rules

  • Send Idempotency-Key on POST /chats and POST /chats/{chatId}/messages

  • Reuse the same key only when retrying the exact same request

  • If the same key is reused with a different payload, Math AI returns 409 IDEMPOTENCY_CONFLICT

  • Replay responses may include x-idempotent-replay: true

Idempotency | Math AI Docs