v2026.6.4
All Bundles
Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.

BatchJob

A batch job submitted for asynchronous processing

Operations

GetCompleted #

method : public : GetCompleted() ~ Int

Return

TypeDescription
Intnumber of successfully completed requests

GetCompletedAt #

method : public : GetCompletedAt() ~ Int

Return

TypeDescription
IntUnix timestamp when the batch completed

GetCreatedAt #

method : public : GetCreatedAt() ~ Int

Return

TypeDescription
IntUnix timestamp when the batch was created

GetEndpoint #

method : public : GetEndpoint() ~ String

Return

TypeDescription
StringAPI endpoint this batch targets

GetErrorFileId #

method : public : GetErrorFileId() ~ String

Return

TypeDescription
StringID of the error file (available when completed)

GetFailed #

method : public : GetFailed() ~ Int

Return

TypeDescription
Intnumber of failed requests

GetId #

method : public : GetId() ~ String

Return

TypeDescription
Stringbatch ID

GetInputFileId #

method : public : GetInputFileId() ~ String

Return

TypeDescription
StringID of the uploaded input .jsonl file

GetOutputFileId #

method : public : GetOutputFileId() ~ String

Return

TypeDescription
StringID of the output file (available when completed)

GetStatus #

method : public : GetStatus() ~ String

Return

TypeDescription
Stringstatus: 'validating', 'in_progress', 'completed', 'failed', 'cancelled'

GetTotal #

method : public : GetTotal() ~ Int

Return

TypeDescription
Inttotal number of requests in the batch

IsComplete #

method : public : IsComplete() ~ Bool

Return

TypeDescription
Booltrue if the batch has finished processing