Generate file upload URL
curl --request POST \
--url https://flows.super.ai/api/flows/{flow_id}/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://flows.super.ai/api/flows/{flow_id}/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://flows.super.ai/api/flows/{flow_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flows.super.ai/api/flows/{flow_id}/upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://flows.super.ai/api/flows/{flow_id}/upload-url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flows.super.ai/api/flows/{flow_id}/upload-url")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://flows.super.ai/api/flows/{flow_id}/upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}flows
Generate file upload URL
Generate pre-signed URL for uploading files to a flow.
Creates a temporary upload URL that allows direct file upload to cloud storage without exposing storage credentials. Each URL is valid for 1 hour. The target flow must belong to the caller’s organization — a flow owned by another org returns 404 without signing anything.
Upload Process
- Call this endpoint to receive an upload URL
- Use PUT request to upload your file to the returned
upload_url - Save the returned
file_keyto reference the file later - File becomes accessible via the flow immediately after upload
Notes
- The declared
content_typeis passed through to storage; the set of file types a flow accepts depends on the tasks that consume them. - Maximum file size: 100MB
POST
/
api
/
flows
/
{flow_id}
/
upload-url
Generate file upload URL
curl --request POST \
--url https://flows.super.ai/api/flows/{flow_id}/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://flows.super.ai/api/flows/{flow_id}/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://flows.super.ai/api/flows/{flow_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flows.super.ai/api/flows/{flow_id}/upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://flows.super.ai/api/flows/{flow_id}/upload-url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flows.super.ai/api/flows/{flow_id}/upload-url")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://flows.super.ai/api/flows/{flow_id}/upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}Authorizations
BearerAuthAPIKeyAuth
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Path Parameters
Query Parameters
MIME type of file to upload (e.g., 'application/pdf', 'image/png')
Response
Pre-signed upload URL successfully generated
The response is of type Response Generate Upload Url Api Flows Flow Id Upload Url Post · object.