Batch

@Serializable
data class Batch(val id: BatchId, val endpoint: Endpoint, val errors: PaginatedList<OpenAIErrorDetails>?, val inputFileId: FileId? = null, val completionWindow: CompletionWindow? = null, val status: Status? = null, val outputFileId: FileId? = null, val errorFileId: FileId? = null, val createdAt: Long? = null, val inProgressAt: Long? = null, val expiresAt: Long? = null, val finalizingAt: Long? = null, val completedAt: Long? = null, val failedAt: Long? = null, val expiredAt: Long? = null, val cancellingAt: Long? = null, val cancelledAt: Long? = null, val requestCounts: RequestCounts? = null, val metadata: Map<String, String>? = null)

Represents a batch object.

Constructors

Link copied to clipboard
constructor(id: BatchId, endpoint: Endpoint, errors: PaginatedList<OpenAIErrorDetails>?, inputFileId: FileId? = null, completionWindow: CompletionWindow? = null, status: Status? = null, outputFileId: FileId? = null, errorFileId: FileId? = null, createdAt: Long? = null, inProgressAt: Long? = null, expiresAt: Long? = null, finalizingAt: Long? = null, completedAt: Long? = null, failedAt: Long? = null, expiredAt: Long? = null, cancellingAt: Long? = null, cancelledAt: Long? = null, requestCounts: RequestCounts? = null, metadata: Map<String, String>? = null)

Properties

Link copied to clipboard
@SerialName(value = "cancelled_at")
val cancelledAt: Long? = null

Unix timestamp for when the batch was cancelled.

Link copied to clipboard
@SerialName(value = "cancelling_at")
val cancellingAt: Long? = null

Unix timestamp for when the batch started cancelling.

Link copied to clipboard
@SerialName(value = "completed_at")
val completedAt: Long? = null

Unix timestamp for when the batch was completed.

Link copied to clipboard
@SerialName(value = "completion_window")
val completionWindow: CompletionWindow? = null

Time frame within which the batch should be processed.

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Long? = null

Unix timestamp for when the batch was created.

Link copied to clipboard
@SerialName(value = "endpoint")
val endpoint: Endpoint

The OpenAI API endpoint used by the batch.

Link copied to clipboard
@SerialName(value = "error_file_id")
val errorFileId: FileId? = null

Identifier of the error file containing outputs of requests with errors.

Link copied to clipboard
@SerialName(value = "errors")
val errors: PaginatedList<OpenAIErrorDetails>?

Container for any errors occurred during batch processing.

Link copied to clipboard
@SerialName(value = "expired_at")
val expiredAt: Long? = null

Unix timestamp for when the batch expired.

Link copied to clipboard
@SerialName(value = "expires_at")
val expiresAt: Long? = null

Unix timestamp for when the batch will expire.

Link copied to clipboard
@SerialName(value = "failed_at")
val failedAt: Long? = null

Unix timestamp for when the batch failed.

Link copied to clipboard
@SerialName(value = "finalizing_at")
val finalizingAt: Long? = null

Unix timestamp for when the batch started finalizing.

Link copied to clipboard
@SerialName(value = "id")
val id: BatchId

Unique identifier for the batch.

Link copied to clipboard
@SerialName(value = "in_progress_at")
val inProgressAt: Long? = null

Unix timestamp for when the batch processing started.

Link copied to clipboard
@SerialName(value = "input_file_id")
val inputFileId: FileId? = null

Identifier of the input file for the batch.

Link copied to clipboard
@SerialName(value = "metadata")
val metadata: Map<String, String>? = null

Metadata associated with the batch as key-value pairs.

Link copied to clipboard
@SerialName(value = "output_file_id")
val outputFileId: FileId? = null

Identifier of the output file containing successfully executed requests.

Link copied to clipboard
@SerialName(value = "request_counts")
val requestCounts: RequestCounts? = null

Container for the counts of requests by their status.

Link copied to clipboard
@SerialName(value = "status")
val status: Status? = null

Current processing status of the batch.