{ "job_id": "abc123def456", "upload_url": "https://zerodrift-ai-v1-validation-documents-dev.s3.amazonaws.com/documents/abc123def456.bin?X-Amz-Algorithm=...", "upload_method": "PUT", "s3_bucket": "zerodrift-ai-v1-validation-documents-dev", "s3_key": "documents/abc123def456.bin", "expires_at": "2026-01-08T11:30:00Z", "expires_in_seconds": 3600, "content_type": "application/pdf", "required_headers": { "Content-Type": "application/pdf", "x-amz-meta-job_id": "abc123def456", "x-amz-meta-uploaded_at": "2026-01-08T10:30:00", "x-amz-meta-filename": "my_document.pdf", "x-amz-meta-document_category": "retail_investor_letter" }, "instructions": { "step_1": "Upload your document to the upload_url using HTTP PUT with ALL required_headers", "step_2": "After successful upload, call POST /api/validate_stream_start/ with the job_id to start validation", "note": "You MUST include all required_headers exactly as provided or S3 will return SignatureDoesNotMatch", "example_curl": "curl -X PUT \"<upload_url>\" -H \"Content-Type: application/pdf\" -H \"x-amz-meta-job_id: abc123...\" ... --data-binary @your-document.pdf" }}
Validation
Get Presigned URL
Get an S3 presigned URL for uploading large documents
{ "job_id": "abc123def456", "upload_url": "https://zerodrift-ai-v1-validation-documents-dev.s3.amazonaws.com/documents/abc123def456.bin?X-Amz-Algorithm=...", "upload_method": "PUT", "s3_bucket": "zerodrift-ai-v1-validation-documents-dev", "s3_key": "documents/abc123def456.bin", "expires_at": "2026-01-08T11:30:00Z", "expires_in_seconds": 3600, "content_type": "application/pdf", "required_headers": { "Content-Type": "application/pdf", "x-amz-meta-job_id": "abc123def456", "x-amz-meta-uploaded_at": "2026-01-08T10:30:00", "x-amz-meta-filename": "my_document.pdf", "x-amz-meta-document_category": "retail_investor_letter" }, "instructions": { "step_1": "Upload your document to the upload_url using HTTP PUT with ALL required_headers", "step_2": "After successful upload, call POST /api/validate_stream_start/ with the job_id to start validation", "note": "You MUST include all required_headers exactly as provided or S3 will return SignatureDoesNotMatch", "example_curl": "curl -X PUT \"<upload_url>\" -H \"Content-Type: application/pdf\" -H \"x-amz-meta-job_id: abc123...\" ... --data-binary @your-document.pdf" }}
Get an S3 presigned URL for uploading large documents (recommended for files > 6MB).
Important: All headers that MUST be included in the upload request. The presigned URL is signed with these headers, so omitting any will result in a SignatureDoesNotMatch error from S3.
Step-by-step instructions and example curl command for uploading
Copy
{ "job_id": "abc123def456", "upload_url": "https://zerodrift-ai-v1-validation-documents-dev.s3.amazonaws.com/documents/abc123def456.bin?X-Amz-Algorithm=...", "upload_method": "PUT", "s3_bucket": "zerodrift-ai-v1-validation-documents-dev", "s3_key": "documents/abc123def456.bin", "expires_at": "2026-01-08T11:30:00Z", "expires_in_seconds": 3600, "content_type": "application/pdf", "required_headers": { "Content-Type": "application/pdf", "x-amz-meta-job_id": "abc123def456", "x-amz-meta-uploaded_at": "2026-01-08T10:30:00", "x-amz-meta-filename": "my_document.pdf", "x-amz-meta-document_category": "retail_investor_letter" }, "instructions": { "step_1": "Upload your document to the upload_url using HTTP PUT with ALL required_headers", "step_2": "After successful upload, call POST /api/validate_stream_start/ with the job_id to start validation", "note": "You MUST include all required_headers exactly as provided or S3 will return SignatureDoesNotMatch", "example_curl": "curl -X PUT \"<upload_url>\" -H \"Content-Type: application/pdf\" -H \"x-amz-meta-job_id: abc123...\" ... --data-binary @your-document.pdf" }}
Required Headers: The presigned URL is signed with metadata headers. You must include ALL headers from the required_headers field exactly as provided when uploading your file. Missing or incorrect headers will result in a SignatureDoesNotMatch error from S3.