Documentation

Idempotency

Retry safely without running or charging twice.

Send an Idempotency-Key header (up to 200 characters) when you may retry a request. Keys are tracked per API key.

  • Same key, same body: 409 duplicate_request. The request is not run again and not charged again. The message names the original request and what it charged.
  • Same key, different body: 422 idempotency_key_reused.
curl https://api.billionairestechnologies.com/api/v1/chat/completions \
  -H "Authorization: Bearer $FRIDAY_API_KEY" \
  -H "Idempotency-Key: order-1042-summary" \
  -H "Content-Type: application/json" \
  -d '{"model":"bt-spark","messages":[{"role":"user","content":"Summarise order 1042"}]}'

A duplicate does not replay the earlier response body; fetch the result from your own records or from usage in the console.