Upload a file in one request
POST /Platform/dtypes/upload
Upload a file in one request. The file is sent base64-encoded; the response is its handle.
Images, PDFs and audio are stored as their own dtype (by their
content, or content_type when it is not recognised); anything else
as file. For files too large for one request body, use the uploads
resource.
Body parameters
content_type: str. Media type, e.g.application/pdf.data_base64: str. The file's bytes, base64-encoded.filename: optional str. Original filename, kept in the value's metadata.
Returns
DtypeUploadResponse
hash: str. The new dtype handle.dtype: str. Dtype class the upload was stored as.
Example request
curl -X POST "https://api.hilus.ai/Platform/dtypes/upload" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'