Files

Register a file after its presigned upload

Changed on

Checks an object uploaded to a presigned URL as the plain upload checks a file, and registers it as a batch input file to use in a batch. The checks are its size, its record count, and that it is JSONL; an object they refuse is deleted. Idempotent; completing an already-registered id returns the existing file.

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

post/v1/files/{id}/complete

Request

  • Base URL
    https://inference.openrelay.inc
  • URL
    https://inference.openrelay.inc/v1/files/{id}/complete
  • 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

    • 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

    • info

      added the non-success response with the status