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

x/openai/resources/batches.ts>Batches

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
namespace Batches
import { Batches } from "https://deno.land/x/openai@v4.69.0/resources/batches.ts";
class Batches
extends APIResource
import { Batches } from "https://deno.land/x/openai@v4.69.0/resources/batches.ts";

Methods

cancel(batchId: string, options?: Core.RequestOptions): Core.APIPromise<Batch>

Cancels an in-progress batch. The batch will be in status cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.

create(body: BatchCreateParams, options?: Core.RequestOptions): Core.APIPromise<Batch>

Creates and executes a batch from an uploaded file of requests

list(query?: BatchListParams, options?: Core.RequestOptions): Core.PagePromise<BatchesPage, Batch>

List your organization's batches.

list(options?: Core.RequestOptions): Core.PagePromise<BatchesPage, Batch>
retrieve(batchId: string, options?: Core.RequestOptions): Core.APIPromise<Batch>

Retrieves a batch.