Sume SDK idempotencyKey: null sends no key, so POST retries stop
subscribeFormatRun mints a UUID Idempotency-Key by default. Pass null and the create call carries no key, so the SDK will not retry it on a 429 or 5xx.

subscribeFormatRun in @sume-com/sdk sets an Idempotency-Key header for you. If you pass idempotencyKey: null, it sends no header at all, and that changes how the client treats a failed create call: the SDK retries a POST only when an Idempotency-Key is present. This page shows the three settings side by side and when null is the wrong choice.
The retry rule lives in createSumeClient. By default it makes up to two retries (maxRetries: 2) on 408, 429, 5xx and transport failures, honors retry-after (capped at 60 seconds) and adds roughly 20% jitter. GETs retry freely. A POST retries only with a key, because repeating a POST without one could start a second paid run.
The three settings
The option is documented in the SDK guide and the runs reference. Omit it and the SDK generates a UUID per call. Pass a string and you control replay across process restarts. Pass null and you opt out.
| Setting | Header sent | Create POST retried on 429/5xx | Restart of your process |
|---|---|---|---|
| omitted | Idempotency-Key: random UUID | Yes | New UUID, so a new run |
| a string you choose | Idempotency-Key: your string | Yes | Same key replays the same run |
| null | none | No | New run |
Code
import { createSumeClient, subscribeFormatRun } from "@sume-com/sdk";
const client = createSumeClient({ apiKey: process.env.SUME_API_KEY! });
const path = { handle: "acme", slug: "product-promo" };
const body = { input: { product_url: "https://shop.example.com/p/8823" } };
// Default: the SDK mints a UUID key, so a 429 or 5xx on the create is retried.
const retried = await subscribeFormatRun({ client, path, body });
// null: no Idempotency-Key header, so the create POST is sent once, never retried.
const once = await subscribeFormatRun({ client, path, body, idempotencyKey: null });
// Your own key: restart the process and the same key replays the same run.
const stable = await subscribeFormatRun({
client,
path,
body,
idempotencyKey: "order-8823-promo-v1",
});When null is the right call
Use null when something upstream already owns retries and you want the first failure to surface unchanged, for example a queue worker that retries with its own key policy. You then see the raw 429 or 5xx once, instead of the SDK waiting out retry-after inside the call.
Do not use null if your workspace policy requires keys. A service-account key can be configured so that a submit without an Idempotency-Key is refused with service_account_idempotency_required; the fix is to send one, not to retry.
When a string beats the default
The auto UUID protects a single call against a transient failure. It does not protect you when your own process crashes after the create succeeds, because the next start mints a new UUID and creates a second run. For a unit of work you can name, such as an order id plus a revision, pass that string. The onCreated callback is the place to persist the run id the moment it exists.
Sources
Related posts
More in Developers
- Sume SDK maxRetries: 0 when your job queue already retries the call
The SDK retries 408, 429 and 5xx twice by default. Under a queue with five attempts that is up to 15 tries. Set maxRetries to 0 and let one layer retry.
- Sume STT mode sync: transcribe a short clip in one request
Send mode sync with wait_timeout_seconds up to 30. A short clip answers 200 with the finished job. A longer one answers 2xx with the queued job to poll.
- Sume STT to an SRT file: build subtitles from sentence segments
Sume returns timed sentence segments, not an SRT. Turn them into a valid .srt file in Python for YouTube, Vimeo or a player, with the timestamp format.
- Preview Sume TTS sentence ids, lengths and job cost before you submit
A short Python script that splits a script like Sume's source API, groups sentences under 20,000 characters and prices each job at $0.0475 per 1,000 characters.
Written by Sume