Retried SDK job submits never create a second job
jobs.create() in the TypeScript SDK sends an idempotency key on every submit, so a retry after a dropped response returns the job you already created. Errors carry the request id, and the API key can come from RENDOBAR_API_KEY.
jobs.create() in @rendobar/sdk now keys every submit. When you pass no idempotencyKey, the SDK generates one for that call, prefixed sdk_, and sends the same key on each retry. If a response is lost after the API accepted the job, the retry gets that job back instead of starting another one. jobs.run() submits through create(), so it works the same way.
A key you pass yourself is sent unchanged. Keys never expire, so an order id or a file hash makes a submit safe to repeat across separate calls too.
- A key belongs to one request. Reusing an idempotency key with a different type, inputs or params now returns
409 CONFLICTnaming the job the key already created, instead of quietly handing that job back. Sending the same request again still returns the same job. - Clear errors for bad query parameters. A filter the API does not accept, such as
GET /jobs?status=bogus, returnsVALIDATION_ERRORnaming the parameter, with the same error shape as every other 400. err.requestId. EveryApiErrorcarries theX-Request-Idof the failed request. Quote it to support and we can find exactly what was sent and what the API answered.- Deprecation notices. When an endpoint you call is deprecated, the SDK tells you once, through
onDeprecationif you pass one andconsole.warnotherwise, with the day it was deprecated. jobs.typeSchema(type). One job type’s params as render-ready fields, its inputs, and the full JSON Schema, the same answer asGET /jobs/types/{type}/schema.RENDOBAR_API_KEY.createClient()with no credential reads the key from the environment in Node, Bun, Deno and Workers withnodejs_compat. AnapiKeyyou pass always wins, and browser code is unaffected.
Nothing changes for code that already passes its own key. The SDK docs cover retries and errors in full, and the TypeScript SDK page shows a submit and wait from install to result.