Table of Contents

Class BatchResponse

Namespace
OpenAI.Batch
Assembly
OpenAI-DotNet.dll
public sealed class BatchResponse : BaseResponse
Inheritance
BatchResponse
Inherited Members
Extension Methods

Properties

BatchErrors

Errors that occured during the batch job.

[JsonInclude]
[JsonPropertyName("errors")]
public BatchErrors BatchErrors { get; }

Property Value

BatchErrors

CancelledAt

[JsonIgnore]
public DateTime? CancelledAt { get; }

Property Value

DateTime?

CancelledAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("cancelled_at")]
public int? CancelledAtUnixTimeSeconds { get; }

Property Value

int?

CompletedAt

[JsonIgnore]
public DateTime? CompletedAt { get; }

Property Value

DateTime?

CompletedAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("completed_at")]
public int? CompletedAtUnixTimeSeconds { get; }

Property Value

int?

CompletionWindow

The time frame within which the batch should be processed.

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

Property Value

string

CreatedAt

[JsonIgnore]
public DateTime CreatedAt { get; }

Property Value

DateTime

CreatedAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("created_at")]
public int CreatedAtUnixTimeSeconds { get; }

Property Value

int

Endpoint

The OpenAI API endpoint used by the batch.

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

Property Value

string

ErrorFileId

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

[JsonInclude]
[JsonPropertyName("error_file_id")]
public string ErrorFileId { get; }

Property Value

string

ExpiredAt

[JsonIgnore]
public DateTime? ExpiredAt { get; }

Property Value

DateTime?

ExpiredAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("expired_at")]
public int? ExpiredAtUnixTimeSeconds { get; }

Property Value

int?

ExpiresAt

[JsonIgnore]
public DateTime? ExpiresAt { get; }

Property Value

DateTime?

ExpiresAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("expires_at")]
public int? ExpiresAtUnixTimeSeconds { get; }

Property Value

int?

FailedAt

[JsonIgnore]
public DateTime? FailedAt { get; }

Property Value

DateTime?

FailedAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("failed_at")]
public int? FailedAtUnixTimeSeconds { get; }

Property Value

int?

FinalizingAt

[JsonIgnore]
public DateTime? FinalizingAt { get; }

Property Value

DateTime?

FinalizingAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("finalizing_at")]
public int? FinalizingAtUnixTimeSeconds { get; }

Property Value

int?

Id

[JsonInclude]
[JsonPropertyName("id")]
public string Id { get; }

Property Value

string

InProgressAt

[JsonIgnore]
public DateTime? InProgressAt { get; }

Property Value

DateTime?

InProgressAtUnixTimeSeconds

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

[JsonInclude]
[JsonPropertyName("in_progress_at")]
public int? InProgressAtUnixTimeSeconds { get; }

Property Value

int?

InputFileId

The ID of the input file for the batch.

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

Property Value

string

Metadata

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 maximum of 512 characters long.

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

Property Value

IReadOnlyDictionary<string, object>

Object

The object type, which is always batch.

[JsonInclude]
[JsonPropertyName("object")]
public string Object { get; }

Property Value

string

OutputFileId

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

[JsonInclude]
[JsonPropertyName("output_file_id")]
public string OutputFileId { get; }

Property Value

string

RequestCounts

The request counts for different statuses within the batch.

[JsonInclude]
[JsonPropertyName("request_counts")]
public RequestCounts RequestCounts { get; }

Property Value

RequestCounts

Status

The current status of the batch.

[JsonInclude]
[JsonPropertyName("status")]
[JsonConverter(typeof(JsonStringEnumConverter<BatchStatus>))]
public BatchStatus Status { get; }

Property Value

BatchStatus

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator string(BatchResponse)

public static implicit operator string(BatchResponse response)

Parameters

response BatchResponse

Returns

string