Files
File upload and download operations
The file URL to generate download link for
Download URL generated
Bad request
Internal server error
GET /api/download?url=text HTTP/1.1
Accept: */*
{
"downloadUrl": "text"
}Upload files including images, videos, AR World files, and other content types. MVP: Public access, no authentication required.
Single file upload
Multiple file uploads
Upload successful
Bad request
Internal server error
POST /api/upload HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
Content-Length: 36
{
"file": "binary",
"files": [
"binary"
]
}{
"status": "success",
"results": [
{
"status": "success",
"message": "text",
"url": "https://example.com",
"fileId": 1,
"fileName": "text",
"fileSize": 1,
"mimeType": "text",
"arWorldUrl": "https://example.com"
}
]
}Uploads an image to be used as a relocalization reference photo for AR experiences. Only image files are accepted.
Bearer token authentication. Pass the session token obtained from /auth/sync.
Image file (jpg, jpeg, png, webp, heic, heif)
Photo uploaded successfully
Full URL to the uploaded image
S3 file key (e.g., reloc/uuid-filename.jpg)
Bad request
Unauthorized
Internal server error
POST /api/upload/relocalization HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"url": "https://example.com",
"key": "text"
}Retrieves the conversion result for a file, or triggers a new GLB to USDZ conversion if not already converted.
File ID
Conversion result
Time taken for conversion (e.g., '2.34s')
Bad request
Resource not found
Conversion timeout
Internal server error
POST /api/upload/{fileId}/converted_file HTTP/1.1
Accept: */*
{
"message": "text",
"originalFile": {
"id": 1,
"fileName": "text",
"fileType": "GLB",
"fileUrl": "https://example.com"
},
"convertedFile": {
"id": 1,
"fileName": "text",
"fileType": "USDZ",
"fileUrl": "https://example.com",
"fileSize": 1
},
"conversionTime": "text"
}MVP: Public access, no authentication required.
Presigned URL generated
Bad request
Internal server error
POST /api/upload/presigned HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"fileName": "text",
"contentType": "text"
}{
"uploadUrl": "text",
"key": "text",
"url": "text"
}Retrieves file metadata by fileId. If the file has been converted to USDZ, returns both original and converted file information. Useful for visualizing already processed files without re-uploading.
ID of the file to retrieve
File information retrieved successfully
fileId is required and must be a number
File not found
Failed to retrieve file
GET /api/upload/convert?fileId=1 HTTP/1.1
Accept: */*
{
"message": "File found with conversion",
"originalFile": {
"id": 1,
"fileName": "text",
"fileType": "GLB",
"fileUrl": "https://example.com"
},
"convertedFile": {
"id": 1,
"fileName": "text",
"fileType": "USDZ",
"fileUrl": "https://example.com",
"fileSize": 1
}
}Uploads a file via multipart/form-data, creates a database record, and automatically converts GLB files to USDZ format. Returns file information including converted USDZ URL if conversion was performed.
File to upload. GLB files will be automatically converted to USDZ.
File uploaded successfully. If GLB file, conversion completed.
File is required or invalid
Upload or conversion failed
POST /api/upload/convert HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"message": "File uploaded and converted successfully",
"originalFile": {
"id": 1,
"fileName": "text",
"fileType": "GLB",
"fileUrl": "https://example.com"
},
"convertedFile": {
"id": 1,
"fileName": "text",
"fileType": "USDZ",
"fileUrl": "https://example.com",
"fileSize": 1
},
"conversionTime": "5.23s"
}Last updated