Files

Get a file's metadata

Changed on

Returns a file's metadata (id, size in bytes, purpose, and creation and expiry times) for a batch input, result or rejections file, without its content. The filename is assigned by the server, not the name you uploaded.

Requires the batch.read permission. See Permissions for the roles and API key permissions that include it.

get/v1/files/{id}

Request

  • Base URL
    https://inference.openrelay.inc
  • URL
    https://inference.openrelay.inc/v1/files/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

Response

OK

bytesinteger required

File size in bytes.

created_atinteger required

Unix timestamp (seconds).

expires_atinteger

Unix timestamp (seconds); files are retained for 30 days.

filenamestring required
idstring required

File id (file-…). Pass it as input_file_id when creating a batch.

object'file' required
purposestring required

"batch" for inputs, "batch_output" / "batch_error" for result files, and "batch_rejections" for the records a batch create rejected (one BatchRecordRejection per line).

Changes

    • 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

      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

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status