curl -X POST "https://videitos.click/api/v1/templates" \
-H "Authorization: Bearer $VIDEITOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Product loops", "model": "gen4.5", "prompt": "Slow cinematic dolly around the product on a white pedestal", "ratio": "1280:720", "duration": 4}'
import os
import requests
url = "https://videitos.click/api/v1/templates"
headers = {"Authorization": f"Bearer {os.environ['VIDEITOS_API_KEY']}"}
payload = {
"name": "Product loops",
"model": "gen4.5",
"prompt": "Slow cinematic dolly around the product on a white pedestal",
"ratio": "1280:720",
"duration": 4,
}
resp = requests.post(url, headers=headers, json=payload)
print(resp.json())
const res = await fetch("https://videitos.click/api/v1/templates", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.VIDEITOS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Product loops",
"model": "gen4.5",
"prompt": "Slow cinematic dolly around the product on a white pedestal",
"ratio": "1280:720",
"duration": 4
}),
});
const data = await res.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload := bytes.NewBufferString(`{"name": "Product loops", "model": "gen4.5", "prompt": "Slow cinematic dolly around the product on a white pedestal", "ratio": "1280:720", "duration": 4}`)
req, _ := http.NewRequest("POST", "https://videitos.click/api/v1/templates", payload)
req.Header.Set("Authorization", "Bearer "+os.Getenv("VIDEITOS_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}
<?php
$ch = curl_init("https://videitos.click/api/v1/templates");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer " . getenv("VIDEITOS_API_KEY"),
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name": "Product loops", "model": "gen4.5", "prompt": "Slow cinematic dolly around the product on a white pedestal", "ratio": "1280:720", "duration": 4}');
$response = curl_exec($ch);
echo $response;