Duplicate-safe retries
If your worker restarts after submitting a request, the same idempotency key can return the existing Convertrilo job.
Reliability guide
Connect Convertrilo to your own queues, cron jobs, imports, and backfills without duplicating jobs when retries happen.
Most production encoding starts inside another queue. The important part is making retries boring: stable idempotency keys, clear external ids, metadata, and terminal status handling.
const idempotencyKey = [
upload.assetId,
upload.targetCodec,
upload.targetResolution
].join(":");
await client.onDemandEncode({
sourceUrl: upload.sourceUrl,
externalId: upload.assetId,
metadata: {
queueJobId: upload.queueJobId,
tenantId: upload.tenantId
},
codec: upload.targetCodec,
resolution: upload.targetResolution,
priority: upload.paidPriority ? "high" : "normal"
}, { idempotencyKey });A durable queue, scheduled job, or import process in your own backend.
Stable asset ids or upload ids for idempotency keys.
A policy for normal versus paid priority jobs.
A terminal-state handler for completed, failed, and canceled jobs.
Recipe
These guides focus on primitives that can be reused by dashboards, queue workers, scripts, CLIs, MCP tools, and agent runtimes.
Derive one idempotency key from your asset id and intended output recipe.
Attach externalId and metadata so your own records can be updated later.
Submit normal or high-priority jobs according to plan, billing, or customer action.
Handle terminal events with polling or signed webhooks instead of leaving local queue jobs open forever.
If your worker restarts after submitting a request, the same idempotency key can return the existing Convertrilo job.
Paid or urgent jobs can set priority while still using the same source, metadata, output, and webhook handling flow.
Use the same pattern for one upload, a folder import, or a scheduled library cleanup pass.
Retry network and submit failures with the same idempotency key. Treat terminal encoding failures as product events that need a policy, because the source or requested settings may be invalid.
Send priority in the job payload for paid or urgent work, then let the worker queue choose priority lanes while normal jobs continue to flow.
Use the API or dashboard cancellation path for jobs that should not continue, then reconcile the terminal state in your own app.
Choose your codec, resolution, FPS, bitrate, quality, and optimization settings. Convertrilo shows the NEU estimate before credits are reserved, and failed jobs release reserved credits back to your balance.