Generate signed path
curl --request GET \
--url https://api.techforgeinnovate.com/storage/generate-signed-path \
--header 'x-api-key: <api-key>'import requests
url = "https://api.techforgeinnovate.com/storage/generate-signed-path"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.techforgeinnovate.com/storage/generate-signed-path', 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://api.techforgeinnovate.com/storage/generate-signed-path",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.techforgeinnovate.com/storage/generate-signed-path"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.techforgeinnovate.com/storage/generate-signed-path")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.techforgeinnovate.com/storage/generate-signed-path")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"signedUrl": "<string>",
"error": "<string>"
}API Reference
Generate signed path
Return a signed URL for a storage object path.
GET
/
storage
/
generate-signed-path
Generate signed path
curl --request GET \
--url https://api.techforgeinnovate.com/storage/generate-signed-path \
--header 'x-api-key: <api-key>'import requests
url = "https://api.techforgeinnovate.com/storage/generate-signed-path"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.techforgeinnovate.com/storage/generate-signed-path', 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://api.techforgeinnovate.com/storage/generate-signed-path",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.techforgeinnovate.com/storage/generate-signed-path"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.techforgeinnovate.com/storage/generate-signed-path")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.techforgeinnovate.com/storage/generate-signed-path")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"signedUrl": "<string>",
"error": "<string>"
}Generate signed path
Returns a signed URL for the storage path you provide.Query parameters
string
required
Storage key to sign, such as
ai-talking-videos/{projectId}/outputs/{file}.mp4.Example request
curl -G "https://api.techforgeinnovate.com/storage/generate-signed-path" \
-H "x-api-key: $TFI_API_KEY" \
--data-urlencode "path=ai-talking-videos/468ea7a0-66e1-4357-a760-236e54167f3e/outputs/15a6331b-3837-4ae8-8fa7-d3ead3388d77.mp4"
Responses
string
required
Signed URL for downloading the file.
string
Returned when the
path query parameter is omitted.{
"signedUrl": "https://cdn.techforgeinnovate.com/..."
}
{
"error": "Path query parameter is required"
}
Status codes
200 OKwhen the path is provided401 Unauthorizedwhen the key is missing or invalid
Notes
- Generate the URL from the storage path returned by your job output.
- The current controller does not return an explicit expiration timestamp.