Skip to main content
Glama

Render a batch (spends credits)

run_batch
DestructiveIdempotent

Queues every pending job in a batch for rendering and returns once they are queued; images render in the background, tracked by get_batch and collected with get_batch_outputs. It spends the workspace organization's credits equal to the pending jobs' cost, which is create_batch's creditCost unless jobs were added or removed since. When the balance is too low nothing is queued, the error says not enough credits, and the batch stays a draft. A successful run publishes a draft, which ends add and remove edits through update_batch; archived batches return an error. Only pending jobs are queued, so a repeat call adds no work and no cost, and jobs reset to pending by update_batch or update_job render on the next call. If the workspace has webhook endpoints, the run's results are sent to them unless webhooks is false. Needs batches:create on the connection and renders:create in the user's workspace role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batchIdYesBatch ID returned by create_batch or list_batches
webhooksNoWhether this run sends its results (batch.completed, job.completed) to the workspace's webhook endpoints. Omit to keep the batch's setting, which is on; pass false only when the user asks not to notify their endpoints

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
failedYesJobs that could not be queued
messageYes
dispatchedYesPending jobs queued by this call; 0 on a repeat call

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources