Upload source files
Use this endpoint to upload reference images or supporting assets before creating a job. Files are persisted to Cloudflare R2 and the response returns public URLs you can pass to the job creation endpoints.
Endpoint
POST /upload
This route accepts a multipart/form-data payload and does not require authentication.
Request body
Submit one or more files in the file form field. Each file is streamed directly to object storage and may use any filename or MIME type.
POST /upload HTTP/1.1
Content-Type: multipart/form-data; boundary=--------------------------form
----------------------------form
Content-Disposition: form-data; name="file"; filename="living-room.jpg"
Content-Type: image/jpeg
(binary data)
----------------------------form--
Response
Successful uploads return HTTP 200 OK with a JSON body listing the public URLs for each uploaded file:
{
"urls": [
"https://cdn.roomrecast.com/uploads/2024-05-01/abc123.jpg"
]
}
If the payload cannot be parsed as form data the service responds with 400 and an error field describing the issue.