Batch

class Batch(apiKey: String, client: HttpClient? = null)

Client for interacting with the Gemini Batch API.

Constructors

Link copied to clipboard
constructor(apiKey: String, client: HttpClient? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun cancelBatch(name: String)

Cancels a batch job.

Link copied to clipboard
suspend fun createBatch(model: String, request: CreateBatchRequest): BatchJob

Creates a batch job for content generation.

Link copied to clipboard
suspend fun createBatchEmbeddings(model: String, request: CreateBatchRequest): BatchJob

Creates a batch job for creating embeddings.

Link copied to clipboard
suspend fun deleteBatch(name: String)

Deletes a batch job.

Link copied to clipboard
suspend fun getBatch(name: String): BatchJob

Gets the status of a batch job (Operation).

Link copied to clipboard
suspend fun listBatches(pageSize: Int? = null, pageToken: String? = null): ListBatchesResponse

Lists batch jobs.