Here's a Python script to upload multiple files using the provided OpenAPI specification: import requests def upload_documents(client_token, files): url = "https://api.example.com/documents" headers = { "Authorization": f"Bearer {client_token}" } # Prepare the files for upload documents = [] for file_path in files: with open(file_path, "rb") as f: file_content = f.read() document = { "content": { "documentIdentifier": file_path.split("/")[-1], "parseImage": False, "inlineContent": { "byteContent": { "data": file_content, "mimeType": "application/octet-stream" }, "type": "BYTE" } }, "metadata": { "inlineAttributes": [ { "key": "filename", "value": file_path.split("/")[-1] } ] } } documents.append(document) # Create the request body request_body = { "clientToken": client_token, "documents": documents } # Send the POST request response = requests.post(url, headers=headers, json=request_body) return response.json() # Example usage client_token = "your-client-token" files = ["path/to/file1.txt", "path/to/file2.txt"] response = upload_documents(client_token, files) print(response) ### Explanation: 1. **Function Definition**: The `upload_documents` function takes `client_token` and `files` as parameters. 2. **URL and Headers**: The URL for the API endpoint and the authorization headers are set. 3. **File Preparation**: Each file is read and its content is added to the `documents` list with the necessary metadata. 4. **Request Body**: The request body is created with the `clientToken` and `documents`. 5. **POST Request**: The POST request is sent to the API endpoint with the request body. Replace `"your-client-token"` with your actual client token and update the file paths in the `files` list. If you have any questions or need further assistance, feel free to ask!