Upload: Init
/videos/upload/initInitialize a video upload and get presigned URLs for video and poster using API key authentication
Authorization
ApiKeyAuth Internal API key for service-to-service communication.
In: header
Request Body
requiredapplication/json{
"file_name": "my-video.mp4",
"image_format": "jpg",
"video_quality": "shorts"
}"basic" | "shorts" | "pro"Response Body
200application/json
OK
type: object
400application/json
Invalid request body
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
401application/json
Unauthorized - Invalid API key
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
403application/json
Access denied
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
500application/json
Failed to initialize upload
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
curl -X POST "https://api.rixl.com/images/upload/init" \
-H "Content-Type: application/json" \
-d '{
"file_name": "my-video.mp4"
}'const body = JSON.stringify({
"file_name": "my-video.mp4"
})
fetch("https://api.rixl.com/images/upload/init", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.rixl.com/images/upload/init"
body := strings.NewReader(`{
"file_name": "my-video.mp4"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.rixl.com/images/upload/init"
body = """{
"file_name": "my-video.mp4"
}"""
response = requests.request("POST", url, data = body, headers = {
"Content-Type": "application/json"
})
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"file_name": "my-video.mp4"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.rixl.com/images/upload/init"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"file_name": "my-video.mp4"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://api.rixl.com/images/upload/init", body);
var responseBody = await response.Content.ReadAsStringAsync();OK
application/json
{
"poster_id": "PS5IMKoFLm",
"poster_presigned_url": "https://images.rixl.com/Bq4y3QB38S/PS5IMKoFLm?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE%2F20250831%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250831T103000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4d55",
"upload_expires": 1640995200,
"video_id": "VI9VXQxWXQ",
"video_presigned_url": "https://videos.rixl.com/Bq4y3QB38S/VI9VXQxWXQ?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE%2F20250831%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250831T103000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4d55"
}Invalid request body
application/json
{
"code": 400,
"details": "The provided ID is not valid",
"error": "Invalid request body"
}Unauthorized - Invalid API key
application/json
{
"code": 401,
"details": "The provided ID is not valid",
"error": "Unauthorized - Invalid API key"
}Access denied
application/json
{
"code": 403,
"details": "The provided ID is not valid",
"error": "Access denied"
}Failed to initialize upload
application/json
{
"code": 500,
"details": "The provided ID is not valid",
"error": "Failed to initialize upload"
}