Files

Upload File

Request upload URLs for one or more files. Use this for batch uploads or when uploading files hosted at remote URLs.

Args: upload_request (FileUploadRequest): Contains files to upload and workspace UUID. - Set remote_uri to fetch files from external URLs - Set local_file_path to generate an upload URL for client-side uploads

Returns: FileUploadResponse: For each file, includes: - file_uuid: Use this to reference the file in eval runs - file_url: Upload URL (PUT your file here) or download URL (for remote_uri files) - processing_status: "pending" for remote files or videos, "completed" otherwise

Example: POST /api/files { "workspace_uuid": "...", "files": [ {"local_file_path": "data.csv"}, {"remote_uri": "https://example.com/file.mp4"} ] }

post/v2/files

Request body

workspace_uuidstring nullable

UUID of the workspace to associate with the upload, if any.

Response

OK

workspace_uuidstring nullable

UUID of the workspace associated with the upload, if any.

Changes

Changed in 1 of the 25 revisions of this API.95

  • 9b529d67a7d095See the full diff
    • added the new auth.workspace_required enum value to the error/code response property for the response status 400

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 401

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 403

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 404

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 409

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 422

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 429

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 500

      response-property-enum-value-added

    • added the new auth.workspace_required enum value to the error/code response property for the response status 503

      response-property-enum-value-added

    • added the new optional request property files/items/content_type

      new-optional-request-property

    • added the new optional request property files/items/remote_uri

      new-optional-request-property

    • added the optional property files/items/content_type to the response with the 200 status

      response-optional-property-added

    • added the optional property files/items/processing_status to the response with the 200 status

      response-optional-property-added

    • added the optional property files/items/remote_uri to the response with the 200 status

      response-optional-property-added