Create a file
POST/api/v1/files
Overview
Create a file record and receive temporary upload instructions. Upload the bytes to the returned URL using the supplied form fields. Registration does not upload or validate the model. Idempotency-Key is optional; successful retries return the original snapshot for 24 hours.
Requires files:write.
Parameters
Idempotency-Key header · optional
Account, method and path scoped retry key, retained for 24 hours from first use. Same body replays the original successful status and body. A changed body returns 409 idempotency_key_reused; an in-flight request returns 409 idempotency_request_in_progress with Retry-After. Retry transient failures with the same key and body.
string
Request body
application/json
filename string · required
Original filename, including .glb, .obj, or .zip. Maximum 255 characters; directory paths, leading/trailing whitespace, and control characters are not allowed.
Min length: 1 · Max length: 255
size_bytes integer (int64) · required
Exact file size in bytes. For ZIPs, use the compressed size. Maximum 400000000 bytes (400 MB).
Minimum: 1 · Maximum: 400000000
Responses
File registered; upload the bytes using the returned instructions.
200 response
JSON
{
"upload": {
"method": "POST",
"url": "https://example-upload-bucket.s3.amazonaws.com/",
"fields": {
"key": "files/2a08c3d391244972a31a0f87d3821fa9/source",
"policy": "GENERATED_POLICY",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "GENERATED_CREDENTIAL_SCOPE",
"x-amz-date": "20260921T180000Z",
"x-amz-signature": "GENERATED_SIGNATURE",
"x-amz-security-token": "GENERATED_SESSION_TOKEN",
"success_action_status": "204"
},
"expires_at": "2026-09-21T19:00:00Z"
},
"id": "file_6c82bd3e319b4bb099310d54a761879e"
}Returns the File object.
Response headers
X-Request-IDRequest identifier for support. Send X-Request-ID with 8–64 ASCII letters, digits or hyphens to reuse that value; otherwise the server generates a UUID4 hex value. Include the returned X-Request-ID in support requests. Do not put secrets or account IDs in this value.
Idempotent-ReplayedPresent when the original successful response is replayed.
Errors
| HTTP | Code | What to do |
|---|---|---|
| 400 Bad Request | file_too_large | The file is over the upload limit. Reduce it before you register it. |
| 400 Bad Request | filename_required | The file registration has no filename. Send the original filename with its extension. |
| 400 Bad Request | invalid_argument | A field, query parameter or header is invalid. Fix the field named in details, then send the request again. |
| 400 Bad Request | invalid_file_size | size_bytes is not a positive whole number. Send the file's exact byte count. |
| 400 Bad Request | size_bytes_required | The file registration has no size_bytes. Send the file's exact byte count. |
| 400 Bad Request | unsupported_file_extension | The file type is not supported. Use a GLB, OBJ or ZIP file. |
| 401 Unauthorized | unauthenticated | The API key is missing, invalid or revoked. Send a valid business API key in Authorization: Bearer. |
| 403 Forbidden | permission_denied | The key lacks the endpoint's scope, or payments lack spending consent. Check the scope listed on the endpoint. |
| 409 Conflict | idempotency_key_reused | This Idempotency-Key was already used with a different body. Retry the original body, or use a new key for a new operation. |
| 409 Conflict | idempotency_request_in_progress | A request with this Idempotency-Key is still running. Wait Retry-After seconds, then retry the same key and body. |
| 413 Content Too Large | request_too_large | The JSON body is over this endpoint's size limit. Send a smaller body. |
| 415 Unsupported Media Type | unsupported_media_type | The body is not JSON. Send Content-Type: application/json. |
| 429 Too Many Requests | resource_exhausted | A rate or account limit was reached. Wait at least Retry-After seconds, then retry. |
| 500 Internal Server Error | internal | The server failed unexpectedly. Retry with backoff; contact support with X-Request-ID if it persists. |
| 503 Service Unavailable | unavailable | A required service is briefly unavailable. Retry with backoff, reusing the same Idempotency-Key. |
API v1 preview