Skip to main content

Functions

Use batch_run_function() for tables, local files, or signed HTTP(S) URLs. Retry-safe S3 submission is an optional mode of this same method. The CLI manages S3 signing, receipts, watching and file downloads when you want an end-to-end command.
The published Function supplies its prompt, model, schema, and sampling defaults. Extra row fields are ignored, optional fields may be absent, and values are converted to strings. batch_run_function() returns a job ID, or None if submission fails. For large results, use download_job_results().

Retry-safe S3 submission

Supply a signed S3 HTTPS GET URL and its pinned identity with a persisted UUID. The deployment must advertise resumable submission support. The SDK has the server validate the request against the persisted key, waits for ingestion acceptance, and returns the original job ID. It creates no receipt files and does not watch execution or download results automatically.
Reuse the same key, owner, object identity and request options after a lost response, interruption or timeout. Only the signed URL may be refreshed; never generate a replacement key just to retry. A retry after acceptance recovers the job ID without downloading the source again. CSV, Parquet and JSONL are supported in this mode; dry_run and stay_attached are unavailable. Like ordinary submission, this returns None on a submission failure or wait timeout and prints a safe error. Inspect a terminal failure before deliberately starting a corrected request with a new key. See the submission states and source identity contract. Use the existing job methods to monitor and retrieve results after acceptance; the job ID is independent of local output paths. To run a single input and wait for the answer, use run_function().
Function execution through Batch is text-only. Image/PDF inputs, web search, and tool calling are not available in Batch. Functions with image or PDF inputs run through run_function().