Video Extensions
curl --request POST \
--url https://www.token-nova.com/v1/videos/extensions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"video": {},
"video.url": "<string>",
"start_time": 123,
"duration": 123
}
'import requests
url = "https://www.token-nova.com/v1/videos/extensions"
payload = {
"model": "<string>",
"prompt": "<string>",
"video": {},
"video.url": "<string>",
"start_time": 123,
"duration": 123
}
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: '<string>',
prompt: '<string>',
video: {},
'video.url': '<string>',
start_time: 123,
duration: 123
})
};
fetch('https://www.token-nova.com/v1/videos/extensions', 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://www.token-nova.com/v1/videos/extensions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'video' => [
],
'video.url' => '<string>',
'start_time' => 123,
'duration' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.token-nova.com/v1/videos/extensions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\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://www.token-nova.com/v1/videos/extensions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/videos/extensions")
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\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
OpenAI Format
Video Extensions
Use POST /v1/videos/extensions to extend a segment of a specified Grok video task.
POST
https://www.token-nova.com
/
v1
/
videos
/
extensions
Video Extensions
curl --request POST \
--url https://www.token-nova.com/v1/videos/extensions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"video": {},
"video.url": "<string>",
"start_time": 123,
"duration": 123
}
'import requests
url = "https://www.token-nova.com/v1/videos/extensions"
payload = {
"model": "<string>",
"prompt": "<string>",
"video": {},
"video.url": "<string>",
"start_time": 123,
"duration": 123
}
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: '<string>',
prompt: '<string>',
video: {},
'video.url': '<string>',
start_time: 123,
duration: 123
})
};
fetch('https://www.token-nova.com/v1/videos/extensions', 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://www.token-nova.com/v1/videos/extensions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'prompt' => '<string>',
'video' => [
],
'video.url' => '<string>',
'start_time' => 123,
'duration' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.token-nova.com/v1/videos/extensions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\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://www.token-nova.com/v1/videos/extensions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/videos/extensions")
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\": \"<string>\",\n \"prompt\": \"<string>\",\n \"video\": {},\n \"video.url\": \"<string>\",\n \"start_time\": 123,\n \"duration\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
Video Extensions
The OpenAI format shares thePOST /v1/videos/extensions path with Unified Video. For an explanation of the Unified Video flow, see Video Extensions (Unified Video).
Use POST /v1/videos/extensions to extend a specified segment of an existing video task; pass the original task ID in video.url in the Body.
- The route entry is
POST /v1/videos/extensions. - Required fields:
model,prompt,video,start_time. - Set
video.urlto the original video task ID, for examplegrok:f673ba58-b053-4d8d-8938-c0b429de4d7f.
Method and Path
POST /v1/videos/extensions
Request Example
curl -X POST https://www.token-nova.com/v1/videos/extensions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"model": "grok-video-3",
"prompt": "play with another white cat",
"duration": 6,
"start_time": 4,
"video": {
"url": "grok:f673ba58-b053-4d8d-8938-c0b429de4d7f"
}
}'
import requests
resp = requests.post(
"https://www.token-nova.com/v1/videos/extensions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
"Accept": "application/json",
},
json={
"model": "grok-video-3",
"prompt": "play with another white cat",
"duration": 6,
"start_time": 4,
"video": {"url": "grok:f673ba58-b053-4d8d-8938-c0b429de4d7f"},
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://www.token-nova.com/v1/videos/extensions", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
model: "grok-video-3",
prompt: "play with another white cat",
duration: 6,
start_time: 4,
video: { url: "grok:f673ba58-b053-4d8d-8938-c0b429de4d7f" },
}),
});
console.log(await response.json());
Response Example
{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
Authentication
Authorization: Bearer YOUR_API_KEY
Body
string
required
Model name, for example
grok-video-3.string
required
Prompt for the extension segment.
object
required
Reference to the original video. Currently requires the
url field.string
required
Original video task ID (not a playable HTTP link), for example
grok:f673ba58-b053-4d8d-8938-c0b429de4d7f.integer
required
Segment start time (seconds); extend from this timestamp in the original video.
integer
Target duration after extension (seconds). Default is
10; supports 6, 10, and 15.Response
string
New extensions task ID.
string
Task status; common values include
processing, completed, and failed.integer
Most recent status update time (Unix timestamp).
Difference Between Extend and Extensions
| Item | Video Extend | Video Extensions |
|---|---|---|
| Path | POST /v1/videos/{video_id}/extend | POST /v1/videos/extensions |
| Original task ID | Path parameter video_id | Body video.url |
| Typical scenario | Extend based on the path-bound original task | Independent entry point, suitable for batch or orchestration calls |
