SDKsTypeScript

Retries & idempotency

Automatic retry behavior and idempotency key handling in the BimpeAI TypeScript SDK.

By default the SDK retries up to twice. It retries connection errors and timeouts, and the status codes 408, 429, and any 5xx other than 501; it never retries 409 or 501. Backoff is exponential with full jitter, and a 429 honours the Retry-After header.

const bimpe = new BimpeAI({ apiKey: '…', maxRetries: 3 });
await bimpe.agents.create(body, { maxRetries: 0 }); // this call only

Write requests accept an idempotencyKey. When retries are on and you do not supply one, the SDK generates a key once per call and reuses it across attempts, so a retried write cannot create a duplicate. The key is sent as the Idempotency-Key header on writes only.

await bimpe.agents.create({ name: 'A' }, { idempotencyKey: 'create-A-2026-06-14' });