The output type for individual results.
InternalCreates a new batch execution result wrapper.
HTTP client for making API requests.
Raw batch execution response from the server.
Gets the timestamp when this batch was canceled.
Cancellation date, or null if not canceled.
Gets the timestamp when this batch completed successfully.
Completion date, or null if not completed.
Gets the timestamp when this batch was created.
Creation date.
Gets the timestamp when this batch failed.
Failure date, or null if not failed.
Gets the unique identifier for this batch execution.
The batch execution ID.
Gets the vault URL of the output JSONL file containing all results.
The output file URL, or null if batch is not completed.
Gets the raw API response without any processing.
The complete batch response object.
Gets the progress statistics for this batch.
Object containing completed, failed, and total execution counts, or null if not available.
Number of completed executions.
Number of failed executions.
Total number of executions in the batch.
Gets the current status of the batch execution.
The batch status.
Gets the timestamp when this batch was last updated.
Last update date.
Downloads the complete output file as a Blob.
The output file is a JSONL (JSON Lines) file where each line contains one execution result with its reference ID, status, and output.
A promise resolving to the output file as a Blob.
Fetches the raw result metadata for a specific execution by its reference ID.
Queries the API for the execution result using the reference ID tag. Returns the complete execution metadata including input, output, and usage statistics.
The reference ID of the execution to retrieve.
A promise resolving to the raw execution result object.
Fetches the output content for a specific execution by its reference ID.
Convenience method that retrieves the raw result and extracts just the output content.
The reference ID of the execution to retrieve.
A promise resolving to the execution output content.
Downloads and parses all results into an array.
Loads the entire output file into memory, parses each line, and extracts
the output content. For large batches, consider using iterateResults() instead.
A promise resolving to an array of all execution outputs.
Asynchronously iterates over raw result items from the output file.
Streams and parses the output file line-by-line, yielding raw JSON objects. Each yielded object contains the full result structure including metadata.
Iteration options.
OptionalabortController?: AbortControllerOptional AbortController to cancel iteration.
Asynchronously iterates over parsed output content from the batch results.
Streams and parses the output file line-by-line, yielding only the output content (not the full result metadata). Memory-efficient for large batches.
Iteration options.
OptionalabortController?: AbortControllerOptional AbortController to cancel iteration.
Streams the output file as a ReadableStream for memory-efficient processing.
Useful for large batches where loading the entire file into memory is not practical.
A promise resolving to a ReadableStream of the output file.
Wraps the completed batch execution response with convenient result access methods.
Provides multiple ways to access batch results:
downloadOutputFile()iterateResults()getResults()getResult(referenceId)Example