Files
Input files: first frames, reference images, video and audio.
- POST
/v1/filesUpload a small file - GET
/v1/filesList files - POST
/v1/uploadsStart a direct upload - POST
/v1/uploads/{upload_id}/completeFinish a direct upload - GET
/v1/files/{file_id}Get one file - DELETE
/v1/files/{file_id}Delete a file - GET
/v1/files/{file_id}/contentDownload a file
POST /v1/files
Upload a small file
multipart/form-data, up to 20 MB. The file is checked and stored in one call. For larger files use /v1/uploads.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
X-Data-Region | header | string: us, eu, uk, in | Same as data_region in the body. |
Request body
multipart/form-data
| Field | Type | Description |
|---|---|---|
file required | string | The file. |
purpose | string: input | |
expires_after[seconds] | integer | Remove the file this long after upload. |
Responses
| Status | Body | When |
|---|---|---|
| 200 | File | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 409 | Error | data_region_locked |
| 413 | Error | request_too_large |
| 422 | Error | file_rejected |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/files
List files
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1; max 100; default 20 |
after | query | string | Return what comes after this id (last_id of the previous page). |
Example
curl -X GET https://api.superveo.io/v1/files \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | FileList | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
POST /v1/uploads
Start a direct upload
For files of any allowed size. You get a signed link; PUT the bytes to it within 15 minutes with the given headers, then call /complete.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
X-Data-Region | header | string: us, eu, uk, in | Same as data_region in the body. |
Request body
| Field | Type | Description |
|---|---|---|
filename | string or null | Shown in file listings. min length 1; max length 255 |
content_type required | string | One of: audio/mp4, audio/mpeg, audio/wav, image/jpeg, image/png, image/webp, video/mp4, video/quicktime, video/webm.min length 1; max length 64 |
bytes | integer or null | Exact size of the file. The upload link accepts no more. min 1 |
size_bytes | integer or null | Older name of bytes.min 1 |
expires_after | ExpiresAfter or null | Remove the file this long after it was created. |
data_region | string: us, eu, uk, in or null | Where to store the output. Only valid if it matches the account's region. |
Example
curl -X POST https://api.superveo.io/v1/uploads \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "first.png",
"content_type": "image/png",
"bytes": 482113
}'import os, uuid, requests
r = requests.request(
"POST", "https://api.superveo.io/v1/uploads",
headers={
"Authorization": f"Bearer {os.environ['SUPERVIDEO_API_KEY']}",
},
json={
"filename": "first.png",
"content_type": "image/png",
"bytes": 482113
},
)
print(r.status_code, r.json())const r = await fetch("https://api.superveo.io/v1/uploads", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SUPERVIDEO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filename": "first.png",
"content_type": "image/png",
"bytes": 482113
}),
});
console.log(r.status, await r.json());Responses
| Status | Body | When |
|---|---|---|
| 200 | Upload | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 409 | Error | data_region_locked |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
POST /v1/uploads/{upload_id}/complete
Finish a direct upload
Checks the uploaded bytes and makes the file usable as an input.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
upload_id required | path | string | upl_... or its file_... id. |
Example
curl -X POST https://api.superveo.io/v1/uploads/upload_id/complete \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | File | OK |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | upload_incomplete |
| 422 | Error | file_rejected |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/files/{file_id}
Get one file
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
file_id required | path | string | File id. |
Example
curl -X GET https://api.superveo.io/v1/files/file_id \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | File | OK |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
DELETE /v1/files/{file_id}
Delete a file
Removes the file now. Refused while an unfinished job still needs it.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
file_id required | path | string | File id. |
Example
curl -X DELETE https://api.superveo.io/v1/files/file_id \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | FileDeleted | OK |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | file_in_use |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/files/{file_id}/content
Download a file
Redirects to a signed link that works for 1 hour (15 minutes for a zdr account).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
file_id required | path | string | File id. |
Example
curl -X GET https://api.superveo.io/v1/files/file_id/content \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 302 | Redirect to a signed download link. | |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 409 | Error | upload_incomplete |
| 410 | Error | data_removed |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |