Start an upload
curl --request POST \
--url https://api.solaraai.com/api/v1/projects/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "video/mp4",
"size_bytes": 48211375
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/uploads"
payload = {
"content_type": "video/mp4",
"size_bytes": 48211375
}
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({content_type: 'video/mp4', size_bytes: 48211375})
};
fetch('https://api.solaraai.com/api/v1/projects/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"part_size": 123,
"parts": [
{
"part_number": 123,
"url": "<string>"
}
],
"total_parts": 123,
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}Upload
Start an upload
Solara AI API: Opens a multipart upload for a recording (.mp4, .mov or .webm). PUT each part’s bytes to its presigned URL with no Authorization header, keep each response’s ETag, then complete the upload.
Permission: Edit (edit).
POST
/
api
/
v1
/
projects
/
uploads
Start an upload
curl --request POST \
--url https://api.solaraai.com/api/v1/projects/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "video/mp4",
"size_bytes": 48211375
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/uploads"
payload = {
"content_type": "video/mp4",
"size_bytes": 48211375
}
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({content_type: 'video/mp4', size_bytes: 48211375})
};
fetch('https://api.solaraai.com/api/v1/projects/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"expires_at": "2023-11-07T05:31:56Z",
"part_size": 123,
"parts": [
{
"part_number": 123,
"url": "<string>"
}
],
"total_parts": 123,
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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
Body
application/json
parts: one presigned PUT per part_size part, completed with each part's ETag. link, for an AI agent (an API key or a connected app; 403 agent_only otherwise): no part URLs, one short upload_link instead, for 2 hours. A GET of it answers the file's presigned PUT as text, so a shell sends the file with: curl -fsS -T "FILE" "$(curl -fsS '<upload_link>')". Then complete-project-upload with no parts
Available options:
parts, link Response
Created