documents.create_upload stages bytes for a granular operation. The handle
is single-use: bytes are deleted when the job that reads them finishes.
Default TTL is 24 hours; the cap is 7 days.
For a durable corpus, use workspaces.
Method signature
Parameters
Returns
UploadResponse: upload_id, file_name, size_bytes, content_hash,
expires_at. Pass the object itself as source to parse/extract/split/classify/ground.
Options
Async
Errors
file_too_large(413) — over the upload size capupload_expired(409) — handle expired or already consumedunsupported_file_type— usually raised by the next operation, not upload