OpenAI Batch

Upload a file to the upstream OpenAI Files API. Batch jobs use JSONL files with purpose=batch.

post/api/files/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/files/
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

File to upload.

purposestring required

File purpose.

provider_idstring required

Provider route with customer-owned credentials, for example openai or parasail.

Example request

{
  "purpose": "batch"
}

Response

Uploaded file.

idstring required

File ID.

objectstring required
bytesinteger

File size in bytes.

created_atinteger

Unix timestamp.

filenamestring
purposestring
statusstring

File status.

status_detailsunknown

Example response

{
  "id": "file-abc123",
  "object": "file",
  "bytes": 12345,
  "created_at": 1710000000,
  "filename": "batch_input.jsonl",
  "purpose": "batch",
  "status": "processed"
}

Changes

    • breaking

      request body became required

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property became nullable for the status

    • info

      api operation id openAiBatch_uploadFile removed and replaced with uploadFile

    • info

      api tag OpenAI Batch added

    • info

      api tag openAiBatch removed

    • info

      removed subschema #1 subschema #2 from the / response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the / response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the / response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the / response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response property oneOf list for the response status

    • breaking

      the response's property type changed from string to object for status

    • breaking

      the response's property type changed from string to object for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status