Batch execution
Use model-supported batch_size controls and handle partial results within an asynchronous task.
Some models expose batch_size to repeat model execution within one logical task. Use the range declared by the selected model. This control is separate from a model-native image count, video shot count, or other output grouping.
Before submitting
Confirm that the model exposes batch_size and that the requested value is valid for its input mode. Keep every other field consistent with that mode's requirements.
Track the parent task
Persist the returned task ID and query that parent task. Individual executions can complete or fail while the parent remains in progress. Partial batch_results must not be interpreted as completion of the entire batch.
Consume results
Inspect the terminal parent state and the successful outputs in the returned result. Read applicable batch entries rather than assuming every requested execution produced one successful output.
See result retrieval and task lifecycle for shared response semantics. Use retry guidance before starting replacement work; a new submission can create new paid executions.