Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/mod.ts>Batch

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
namespace Batch
import { Batch } from "https://deno.land/x/openai@v4.69.0/resources/mod.ts";
interface Batch
import { type Batch } from "https://deno.land/x/openai@v4.69.0/resources/mod.ts";

Properties

id: string
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.

input_file_id: string

The ID of the input file for the batch.

object: "batch"

The object type, which is always batch.

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

The current status of the batch.

optional
cancelled_at: number

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

optional
cancelling_at: number

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

optional
completed_at: number

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

optional
error_file_id: string

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

optional
errors: Batch.Errors
optional
expired_at: number

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

optional
expires_at: number

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

optional
failed_at: number

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

optional
finalizing_at: number

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

optional
in_progress_at: number

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

optional
metadata: unknown | null

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.

optional
output_file_id: string

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

optional
request_counts: BatchRequestCounts

The request counts for different statuses within the batch.