Skip to content

Upload a file (multipart)

Terminal window
curl -X POST https://api.spawnbase.gg/api/v1/file \
-H "Authorization: YOUR_TOKEN" \
-F "file=@clip.mp4" \
-F "path=videos" \
-F 'metadata={"player":"x"}'

Form fields: file (required), filename, path, metadata, retentionExempt. Returns the file id, its CDN url and originalUrl (the non-custom-domain URL).

Errors: 400 bad_file (no file field / empty file), 403 quota_exceeded (plan storage full), 413 too_large (multipart request over 8 MiB including the envelope). Use raw presigned PUT with Content-Length for larger files up to 100,000,000 bytes. Full payload shape: API reference.