interface Batch {
    cancelled_at?: number;
    cancelling_at?: number;
    completed_at?: number;
    completion_window: string;
    created_at: number;
    endpoint: string;
    error_file_id?: string;
    errors?: Errors;
    expired_at?: number;
    expires_at?: number;
    failed_at?: number;
    finalizing_at?: number;
    id: string;
    in_progress_at?: number;
    input_file_id: string;
    metadata?: unknown;
    object: "batch";
    output_file_id?: string;
    request_counts?: BatchRequestCounts;
    status:
        | "failed"
        | "cancelled"
        | "expired"
        | "in_progress"
        | "completed"
        | "cancelling"
        | "validating"
        | "finalizing";
}

Properties

cancelled_at?: number

The Unix timestamp (in seconds) for when the batch was cancelled.

cancelling_at?: number

The Unix timestamp (in seconds) for when the batch started cancelling.

completed_at?: number

The Unix timestamp (in seconds) for when the batch was completed.

completion_window: string

The time frame within which the batch should be processed.

created_at: number

The Unix timestamp (in seconds) for when the batch was created.

endpoint: string

The OpenAI API endpoint used by the batch.

error_file_id?: string

The ID of the file containing the outputs of requests with errors.

errors?: Errors
expired_at?: number

The Unix timestamp (in seconds) for when the batch expired.

expires_at?: number

The Unix timestamp (in seconds) for when the batch will expire.

failed_at?: number

The Unix timestamp (in seconds) for when the batch failed.

finalizing_at?: number

The Unix timestamp (in seconds) for when the batch started finalizing.

id: string
in_progress_at?: number

The Unix timestamp (in seconds) for when the batch started processing.

input_file_id: string

The ID of the input file for the batch.

metadata?: unknown

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

object: "batch"

The object type, which is always batch.

output_file_id?: string

The ID of the file containing the outputs of successfully executed requests.

request_counts?: BatchRequestCounts

The request counts for different statuses within the batch.

status:
    | "failed"
    | "cancelled"
    | "expired"
    | "in_progress"
    | "completed"
    | "cancelling"
    | "validating"
    | "finalizing"

The current status of the batch.