curl --request POST \
--url https://api.solaraai.com/api/v1/projects/{id}/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 1073741824
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/media/uploads"
payload = { "size_bytes": 1073741824 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 1073741824})
};
fetch('https://api.solaraai.com/api/v1/projects/{id}/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"media": {
"byte_size": 123,
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"purpose": "shot",
"source": "upload",
"state": "uploading",
"description": "<string>",
"duration_ms": 123,
"failure": "<string>",
"file_name": "<string>",
"has_audio": true,
"height": 123,
"sort_order": 123,
"tags": [
"<string>"
],
"url": "<string>",
"width": 123
},
"part_size": 123,
"parts": [
{
"part_number": 123,
"url": "<string>"
}
],
"total_parts": 123,
"upload_link": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Add a photo or clip
Solara AI API: Opens one item of a video’s footage, by the video_id Get an upload answers for the recording: a JPEG, PNG, WebP or HEIC photo of at most 20 MB, or an MP4, MOV or WebM clip of at most 2 GiB and 3 minutes. PUT each part to its presigned URL with no Authorization header, keep each response’s ETag, then complete it. A video holds 30 items and 15 minutes of clips on a plan, 10 items and 3 minutes without one (409 media_limit); a workspace adds at most 150 items and 60 minutes of clips a UTC day (429 media_daily_limit).
Permission: Edit (edit).
curl --request POST \
--url https://api.solaraai.com/api/v1/projects/{id}/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 1073741824
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/media/uploads"
payload = { "size_bytes": 1073741824 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 1073741824})
};
fetch('https://api.solaraai.com/api/v1/projects/{id}/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"media": {
"byte_size": 123,
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"purpose": "shot",
"source": "upload",
"state": "uploading",
"description": "<string>",
"duration_ms": 123,
"failure": "<string>",
"file_name": "<string>",
"has_audio": true,
"height": 123,
"sort_order": 123,
"tags": [
"<string>"
],
"url": "<string>",
"width": 123
},
"part_size": 123,
"parts": [
{
"part_number": 123,
"url": "<string>"
}
],
"total_parts": 123,
"upload_link": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Path Parameters
Body
parts: one presigned PUT per part_size part, completed with each part's ETag. link, for an AI agent only (403 agent_only otherwise): one short upload_link whose GET answers the whole file's presigned PUT as text, for 2 hours: curl -fsS -T "FILE" "$(curl -fsS '<upload_link>')". Then complete-project-media-upload with no parts
parts, link shot: footage for the AI to place (422 broll_off while footage is off for the workspace); block: a clip dropped on the timeline into a picture block, an MP4, MOV or WebM only, which the AI never places or describes (422 picture_blocks_off while picture blocks are off); auto_edit: a video or photo of an auto edit's reel, held to its caps, from the Solara app only (403 api_key_not_allowed with an API key; 422 auto_edit_off while it is off; 422 auto_edit_locked once the reel started). All hold a place under the video's limits
shot, block, auto_edit Response
Created