Files & Batches

Create Openai Batch

Changed on
post/v1/batches

Request

  • Base URL: https://api.deepinfra.com
  • URL: https://api.deepinfra.com/v1/batches
  • Auth: HTTP bearer

Headers

xi-api-keystring nullable
x-api-keystring nullable

Request body

input_file_idstring required

The ID of an uploaded file that contains requests for the new batch.

endpoint'/v1/chat/completions' | '/v1/completions' | '/v1/embeddings' required

The endpoint to be used for all requests in the batch. Currently /v1/chat/completions, /v1/completions, /v1/embeddings are supported.

completion_window'24h' required

The time frame within which the batch should be processed. Currently only 24h is supported.

metadataobject nullable

Optional metadata to be stored with the batch.

Response

Successful Response

idstring required

The batch ID.

object'batch'

The object type, which is always batch.

endpointstring required

The API endpoint used for the batch.

input_file_idstring required

The ID of the input file for the batch.

completion_windowstring required

The time frame within which the batch should be processed.

statusstring required

The current status of the batch.

output_file_idstring nullable

The ID of the output file.

error_file_idstring nullable

The ID of the error file.

created_atinteger required

The Unix timestamp of when the batch was created.

in_progress_atinteger nullable

The Unix timestamp of when the batch started processing.

expires_atinteger required

The Unix timestamp of when the batch will expire.

finalizing_atinteger nullable

The Unix timestamp of when the batch started finalizing.

completed_atinteger nullable

The Unix timestamp of when the batch completed.

failed_atinteger nullable

The Unix timestamp of when the batch failed.

expired_atinteger nullable

The Unix timestamp of when the batch expired.

cancelling_atinteger nullable

The Unix timestamp of when the batch started cancelling.

cancelled_atinteger nullable

The Unix timestamp of when the batch was cancelled.

metadataobject nullable

Metadata associated with the batch.

modelstring nullable

The model used for the batch.

Changes

    • info

      added the optional property /// to the response with the status

    • breaking

      the response property became optional for the status

    • info

      api tag Files & Batches added

    • info

      added the new optional header request parameter x-api-key

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      added the new /v1/embeddings enum value to the request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added to the response property anyOf list for the response status

    • info

      added to the response property anyOf list for the response status

    • info

      removed subschema #1 from the response property anyOf list for the response status

    • info

      removed subschema #1 from the response property anyOf list for the response status

    • info

      the response property const value batch was added for the status

    • info

      the response's property default value batch was added for the status