curl --request POST \ --url https://api.aihubmax.com/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "grok-imagine-video-extension", "prompt": "The camera slowly zooms out to reveal the city skyline at sunset", "video_url": "https://example.com/input-video.mp4", "duration": 6}'
import requests
url = "https://api.aihubmax.com/v1/videos/generations"
payload = {
"model": "grok-imagine-video-extension",
"prompt": "The camera slowly zooms out to reveal the city skyline at sunset",
"video_url": "https://example.com/input-video.mp4",
"duration": 6
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-imagine-video-extension',
prompt: 'The camera slowly zooms out to reveal the city skyline at sunset',
video_url: 'https://example.com/input-video.mp4',
duration: 6
})
};
fetch('https://api.aihubmax.com/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aihubmax.com/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.aihubmax.com/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.aihubmax.com/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}"
response = http.request(request)
puts response.read_body
curl --request POST \ --url https://api.aihubmax.com/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "grok-imagine-video-extension", "prompt": "The camera slowly zooms out to reveal the city skyline at sunset", "video_url": "https://example.com/input-video.mp4", "duration": 6}'
import requests
url = "https://api.aihubmax.com/v1/videos/generations"
payload = {
"model": "grok-imagine-video-extension",
"prompt": "The camera slowly zooms out to reveal the city skyline at sunset",
"video_url": "https://example.com/input-video.mp4",
"duration": 6
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-imagine-video-extension',
prompt: 'The camera slowly zooms out to reveal the city skyline at sunset',
video_url: 'https://example.com/input-video.mp4',
duration: 6
})
};
fetch('https://api.aihubmax.com/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aihubmax.com/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.aihubmax.com/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.aihubmax.com/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"grok-imagine-video-extension\",\n \"prompt\": \"The camera slowly zooms out to reveal the city skyline at sunset\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"duration\": 6\n}"
response = http.request(request)
puts response.read_body