To include a document or image for DeepResearch to analyze, you typically upload the file through an API or a user interface (UI). Supported formats usually include common file types like PDFs (for documents) and PNG, JPEG, or TIFF (for images). The process involves sending the file to a designated endpoint or using a drag-and-drop interface, depending on the platform’s design. Authentication, such as an API key, is often required to ensure authorized access. For example, a REST API might accept multipart form data, while a UI could provide a file picker or drag-and-drop zone. This step ensures the system can access and process the content.
For API-based integration, you’d use a POST request to send the file. Here’s a Python example using the requests library:
import requests
url = "https://api.deepresearch.com/v1/analyze"
api_key = "YOUR_API_KEY"
file_path = "/path/to/your/file.pdf"
with open(file_path, 'rb') as file:
response = requests.post(
url,
headers={"Authorization": f"Bearer {api_key}"},
files={"file": file}
)
This code sends the file to DeepResearch’s analysis endpoint. For command-line tools, curl can be used similarly:
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -F "file=@/path/to/file.jpg" https://api.deepresearch.com/v1/analyze
These methods work for both documents and images, though the system may handle them differently internally (e.g., extracting text from PDFs vs. analyzing image pixels).
Before uploading, ensure files meet requirements. For PDFs, confirm text is extractable (scanned PDFs may require OCR preprocessing). Images should be clear and properly oriented. Some systems impose file size limits (e.g., 50MB), so compressing large files or splitting multi-page PDFs might be necessary. If the platform doesn’t auto-detect content, specify metadata like content-type in API headers. After upload, check the response for success status or errors (e.g., unsupported formats). Preprocessing steps like resizing images or validating PDF structure can reduce analysis failures.
