Table of Contents

Class CreateBatchRequest

Namespace
OpenAI.Batch
Assembly
OpenAI-DotNet.dll
public sealed class CreateBatchRequest
Inheritance
CreateBatchRequest
Inherited Members

Constructors

CreateBatchRequest(string, string, IReadOnlyDictionary<string, object>)

public CreateBatchRequest(string inputFileId, string endpoint, IReadOnlyDictionary<string, object> metadata = null)

Parameters

inputFileId string

The ID of an uploaded file that contains requests for the new batch. Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 100 MB in size.

endpoint string

The endpoint to be used for all requests in the batch. Currently, '/v1/chat/completions', '/v1/embeddings', and '/v1/completions' are supported. Note that '/v1/embeddings' batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.

metadata IReadOnlyDictionary<string, object>

Optional custom metadata for the batch.

Properties

CompletionWindow

[JsonPropertyName("completion_window")]
public string CompletionWindow { get; }

Property Value

string

Endpoint

[JsonPropertyName("endpoint")]
public string Endpoint { get; }

Property Value

string

InputFileId

[JsonPropertyName("input_file_id")]
public string InputFileId { get; }

Property Value

string

Metadata

[JsonPropertyName("metadata")]
public IReadOnlyDictionary<string, object> Metadata { get; }

Property Value

IReadOnlyDictionary<string, object>