Batch

interface Batch

Create large batches of API requests for asynchronous processing. The Batch API returns completions within 24 hours for a 50% discount.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun batch(id: <Error class: unknown class>, requestOptions: <Error class: unknown class>? = null): Batch?

Retrieves a batch.

abstract suspend fun batch(request: <Error class: unknown class>, requestOptions: <Error class: unknown class>? = null): Batch

Creates and executes a batch from an uploaded file of requests.

Link copied to clipboard
abstract suspend fun batches(after: <Error class: unknown class>? = null, limit: Int? = null, requestOptions: <Error class: unknown class>? = null): List<Batch>

List your organization's batches.

Link copied to clipboard
abstract suspend fun cancel(id: <Error class: unknown class>, requestOptions: <Error class: unknown class>? = null): Batch?

Cancels an in-progress batch.