Render up to 100 images in one request
Send up to 100 renders in one request. They are checked and charged together, or not at all.
Updated
Why batch
- One request instead of 100, so a big job uses a sliver of your rate limit.
- One charge: you know up front whether the whole job will run.
- One Idempotency-Key makes the whole job safe to retry.
Send a batch
Put up to 100 renders in a renders array. Each item takes the same fields as a single render, and products and paint colors can be mixed. upscale applies to the whole request.
curl -X POST https://www.skipshoot.com/api/v1/renders \
-H "Authorization: Bearer $SKIPSHOOT_SECRET_KEY" \
-H "Idempotency-Key: fall-collection-batch-1" \
-H "Content-Type: application/json" \
-d '{
"renders": [
{
"scene_id": 812,
"product_id": 4410
},
{
"scene_id": 812,
"product_id": 4411
},
{
"scene_id": 812,
"product_id": 4412
},
{
"scene_id": 815,
"product_id": 4410,
"surface_id": "chair_1"
}
]
}'The answer lists one render per item, in the order you sent them, and the credits charged. Each item in a real answer is a full Render; it is shortened here:
{
"renders": [
{
"id": "3f2b8e9a-6c1d-4e7b-9a05-2d8c41f7b6e0",
"status": "queued"
},
{
"id": "9a052d8c-41f7-4b6e-83f2-b8e9a6c1d4e7",
"status": "queued"
},
{
"id": "c1d4e7b9-a052-4d8c-81f7-b6e03f2b8e9a",
"status": "queued"
},
{
"id": "e9a6c1d4-e7b9-4a05-92d8-c41f7b6e03f2",
"status": "queued"
}
],
"credits_charged": 4
}All or nothing
A batch is checked as a whole before anything is charged. If any item cannot be done, or the workspace has too few credits for all of them, the request is refused, nothing is queued and nothing is charged. The error names the scene or product to fix.
- Every scene must be
ready, and every scene and product must be in your workspace. - Each product must fit its surface or, with no
surface_id, some surface in its scene. - The same render may not appear twice in one request. Two items with the same scene and product and no
surface_idcount as the same render, since both would go on the same surface.
Render every finish in every room
To show a product line in each of your rooms, build the batch from every pairing of scene and product:
const scenes = [812, 815, 820];
const products = [4410, 4411, 4412, 4413, 4414];
const renders = scenes.flatMap((scene_id) =>
products.map((product_id) => ({ scene_id, product_id })),
);
// 3 rooms × 5 finishes = 15 renders, 15 credits, one request.Work with more than 100 renders
- Split the work into chunks of up to 100, and give each chunk its own Idempotency-Key, such as your job’s id and the chunk’s number.
- Check your credits with Retrieve your account first, and stop on
insufficient_creditsinstead of retrying. - Renders run 3 at a time, in the order you sent them, so a large job finishes over tens of minutes. Queue it, and collect the images as they arrive.
Sync a catalog puts all of this into one script you can rerun safely.
Collect the results
Renders in a batch finish at different times. Poll the unfinished ones and download each image as its render completes. See Poll many renders efficiently. Cancel any you no longer need while they are still queued, with Cancel a render.
Something these pages do not answer? Email admin@skipshoot.com and we’ll help.
