buildonce.app
Render

Batch renders

A batch renders one template once per row of values — product cards from a catalogue, certificates from a class list, listings from a spreadsheet — in one call. You send the template, the options every row shares and up to 1,000 rows; the call answers at once with a batchId and the rows render in the background. Each row becomes an ordinary render request (rnd_…): it shows in render history (where GET /v1/renders marks it with "batch": { "batchId": "bat_…", "row": 3 }), fires the usual render webhooks and is charged like a single render — only if it succeeds.

  • A failed row keeps its error and the other rows carry on.
  • Too many rows, or not enough credits for every row, is refused before anything runs.
  • When the last row ends, one batch.completed webhook is sent.
  • A finished batch downloads as one ZIP of every file plus results.csv.
No code? The dashboard’s Bulk generate page does all of this from a CSV or a paste from Excel or Google Sheets, with column matching, live progress and the ZIP.
Render

POST /v1/renders/batch

POST/v1/renders/batchscope: render:write

Start a batch: one template, the options every row shares, and one entry per row. Answers 202 with the batch.

ParamTypeNotes
templateId*tpl_…The template's public id.
items*array (1–1,000)One entry per render: { modifications, fileName? }. modifications works exactly like a single render’s, page-scoped keys (page2@headline) included; an empty value keeps the template’s own.
items[].fileNamestringNames this row’s file(s) in the ZIP. Defaults to row-<n>.
format"png" | "jpeg" | "pdf" | "mp4" | "webm" | "gif"Defaults to png. Applies to every row.
allPagesbooleanRender every page per row (one file per page; a PDF is one file).
pageIdstringWhich page to render when allPages is off.
videoobjectfps, scale, quality — as on a single render. Video formats only.
animationobjectPer-render timing, as on a single render.
idempotencyKeystringSend the same key again and you get the same batch back — nothing runs twice.
curl -X POST https://buildonce.app/v1/renders/batch \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "templateId": "tpl_123", "format": "png", "idempotencyKey": "spring-sale-2026", "items": [ { "modifications": { "headline": "Summer sale", "photo": "https://…/a.jpg" }, "fileName": "summer-sale" }, { "modifications": { "headline": "Autumn deals", "page2@price": "$19" }, "fileName": "autumn" }, { "modifications": { "headline": "Winter warmers" } } ] }'
Request body
{
  "templateId": "tpl_123",
  "format": "png",
  "idempotencyKey": "spring-sale-2026",
  "items": [
    { "modifications": { "headline": "Summer sale", "photo": "https://…/a.jpg" }, "fileName": "summer-sale" },
    { "modifications": { "headline": "Autumn deals", "page2@price": "$19" }, "fileName": "autumn" },
    { "modifications": { "headline": "Winter warmers" } }
  ]
}

The 202 response is the batch with status: "queued" and every row waiting — the same shape as GET /v1/batches/:batchId. A publish block is not accepted on a batch (400).

Render

GET /v1/batches/:batchId

GET/v1/batches/:batchIdscope: render:write

A batch's progress and every row: its status, its renderId and files once it succeeded, or its error. Poll it while the batch runs — it is exempt from the plan's per-minute limit.

ParamTypeNotes
status"queued" | "processing" | "succeeded" | "partial" | "failed" | "canceled"partial: some rows failed. canceled: it was stopped. finishedAt is set once every row has ended.
items[].status"queued" | "processing" | "succeeded" | "failed" | "canceled"Each row on its own.
remainingnumberRows not ended yet.
optionsobjectThe shared options the batch ran with — send failed rows again with the same settings.
curl https://buildonce.app/v1/batches/bat_89acrvdg3k4y \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY"
Response
{
  "batchId": "bat_89acrvdg3k4y",
  "templateId": "tpl_123",
  "templateName": "Spring sale · Square",
  "templateThumbnailUrl": "https://…/thumbnail/p1.png",
  "format": "png",
  "options": { "allPages": false },
  "status": "partial",
  "total": 3,
  "succeeded": 2,
  "failed": 1,
  "canceled": 0,
  "remaining": 0,
  "creditsCharged": 2,
  "createdAt": "2026-11-24T09:15:00.000Z",
  "finishedAt": "2026-11-24T09:15:42.000Z",
  "items": [
    {
      "row": 1,
      "status": "succeeded",
      "fileName": "summer-sale",
      "modifications": { "headline": "Summer sale", "photo": "https://…/a.jpg" },
      "renderId": "rnd_wdbw5wrmp2wg",
      "files": [{ "url": "https://…/renders/45ae….png", "pageId": "s1", "width": 1080, "height": 1080, "byteSize": 482113 }],
      "creditsCharged": 1,
      "error": null
    },
    {
      "row": 2,
      "status": "failed",
      "fileName": "autumn",
      "modifications": { "headline": "Autumn deals", "page2@price": "$19" },
      "renderId": null,
      "files": [],
      "creditsCharged": 0,
      "error": { "status": 400, "code": "IMAGE_FETCH_FAILED", "message": "Image from \"example.com\" could not be loaded: HTTP 404" }
    }
    /* … one entry per row */
  ]
}
Render

GET /v1/batches

GET/v1/batchesscope: render:write

The workspace's batches, newest first, without their rows.

ParamTypeNotes
pagenumberDefaults to 1.
limitnumberDefaults to 25, max 100.
status"running" | "done" | "errors" | "stopped"running: not finished. done: every row succeeded. errors: partial or failed. stopped: canceled.
searchstringPart of the template's name.
curl "https://buildonce.app/v1/batches?status=errors&limit=10" \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY"
Render

POST /v1/batches/:batchId/cancel

POST/v1/batches/:batchId/cancelscope: render:write

Stop a batch. Rows not started yet become canceled and are never charged; rows already rendering finish. Returns the batch.

curl -X POST https://buildonce.app/v1/batches/bat_89acrvdg3k4y/cancel \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY"

To carry on later, send the canceled rows (their modifications and fileName are in the batch) as a new batch. Canceling a finished batch changes nothing.

Render

GET /v1/batches/:batchId/zip

GET/v1/batches/:batchId/zipscope: render:write

Every file of a finished batch as one ZIP, plus results.csv. Streamed as it is written, so even a very large batch starts downloading at once.

ParamTypeNotes
fromnumberFirst row to include (1-based).
tonumberLast row to include.
curl -L https://buildonce.app/v1/batches/bat_89acrvdg3k4y/zip \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY" \
  -o batch.zip
  • Files are named by the row’s fileName, else row-<n>; a multi-page row adds -p1, -p2…; duplicate names get -2.
  • results.csv lists every row — row, status, file_name, render_id, urls, error_code, error_message — so you can bring the links back into your own sheet.
  • 409 BATCH_NOT_FINISHED while it runs. Over 4 GB is 413 BATCH_ZIP_TOO_LARGE: download it in parts with from and to. A range that selects no rows (from after to, or past the last row) is 400 BATCH_ZIP_RANGE_INVALID; a to past the end just stops at the last row.
Render

Limits & credits

ParamTypeNotes
Rows per batchFree: 50 · paid: 1,000Over it is 400 BATCH_TOO_LARGE, before anything runs.
Video rows100mp4, webm or gif: one row can take minutes to render.
Creditsas a single render1 per image or PDF page, 1 per started video second — charged per row, only when it succeeds. Not enough credits for every row is 402 before anything runs.
SpeedbackgroundRows render one after another on their own lane, so a big batch never holds up your single renders. 500 images take about 8 minutes.
Render

batch.completed webhook

Subscribe a workspace webhook to batch.completed to hear once when the last row ends — instead of polling. Each row still sends its own render.completed or render.failed.

Payload
{
  "type": "batch.completed",
  "data": {
    "batchId": "bat_89acrvdg3k4y",
    "status": "partial",
    "total": 500,
    "succeeded": 498,
    "failed": 2,
    "canceled": 0,
    "creditsCharged": 498
  }
}
Render

Errors

ParamTypeNotes
400 BATCH_TOO_LARGEcreateMore rows than the plan or format allows. Split the rows into smaller batches.
402 INSUFFICIENT_CREDITScreateThe workspace can’t pay for every row. Nothing was queued or charged.
503 BATCH_UNAVAILABLE / QUEUE_UNAVAILABLEcreateBatches can’t be queued right now. Try again; nothing was charged.
404 BATCH_NOT_FOUNDget, cancel, zipNo batch with that id in this workspace.
409 BATCH_NOT_FINISHEDzipThe batch is still rendering.
400 BATCH_ZIP_RANGE_INVALIDzipfrom is after to, or past the batch’s last row.
413 BATCH_ZIP_TOO_LARGEzipOver 4 GB — use from / to.

A row’s own failure (a broken image link, an unknown page…) is not an HTTP error: it is that row’s error, with the same code a single render would return.

Was this page helpful?