Start a direct file upload (link valid 15 minutes)
curl --request POST \
--url https://api.pramaan.dev/v1/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contentType": "<string>",
"sizeBytes": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contentType: '<string>', sizeBytes: 123})
};
fetch('https://api.pramaan.dev/v1/files/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pramaan.dev/v1/files/uploads"
payload = {
"contentType": "<string>",
"sizeBytes": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"fileId": "<string>",
"uploadUrl": "<string>",
"headers": {},
"expiresAt": "<string>"
}{
"error": {
"code": "addendum_required",
"message": "<string>",
"next": "<string>",
"request_id": "<string>",
"retryable": true,
"effect": "none",
"slot": "<string>",
"required_micro": 123,
"reason": "balance",
"top_up": {
"message": "<string>",
"links": [
{
"label": "<string>",
"url": "<string>"
}
],
"balance_micro": 123,
"required_micro": 123
},
"available_micro": 123,
"plan": "<string>",
"needs": [
{
"kind": "approval",
"detail": "<string>",
"step": "<string>"
}
]
}
}platform
Start a direct file upload (link valid 15 minutes)
POST
/
v1
/
files
/
uploads
Start a direct file upload (link valid 15 minutes)
curl --request POST \
--url https://api.pramaan.dev/v1/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contentType": "<string>",
"sizeBytes": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contentType: '<string>', sizeBytes: 123})
};
fetch('https://api.pramaan.dev/v1/files/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pramaan.dev/v1/files/uploads"
payload = {
"contentType": "<string>",
"sizeBytes": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"fileId": "<string>",
"uploadUrl": "<string>",
"headers": {},
"expiresAt": "<string>"
}{
"error": {
"code": "addendum_required",
"message": "<string>",
"next": "<string>",
"request_id": "<string>",
"retryable": true,
"effect": "none",
"slot": "<string>",
"required_micro": 123,
"reason": "balance",
"top_up": {
"message": "<string>",
"links": [
{
"label": "<string>",
"url": "<string>"
}
],
"balance_micro": 123,
"required_micro": 123
},
"available_micro": 123,
"plan": "<string>",
"needs": [
{
"kind": "approval",
"detail": "<string>",
"step": "<string>"
}
]
}
}Authorizations
API key: sk_live_…
Body
application/json