curl --request GET \
--url https://api.deepshi.ai/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepshi.ai/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deepshi.ai/v1/videos/{video_id}', 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.deepshi.ai/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.deepshi.ai/v1/videos/{video_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.deepshi.ai/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepshi.ai/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "vid_a1b2c3",
"object": "video",
"model": "grok-imagine-video",
"status": "completed",
"size": "480p",
"seconds": "4",
"created_at": 1783695957,
"videos": [
{
"type": "url",
"url": "https://media.cdn-deepshi.com/videos/019f4c8f-....mp4",
"content_type": "video/mp4"
}
]
}{
"error": {
"message": "Incorrect API key provided.",
"type": "invalid_request_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "invalid_request_error",
"code": "model_not_found",
"param": null
}
}{
"error": {
"message": "Video not found.",
"type": "invalid_request_error",
"code": "video_not_found",
"param": "video_id"
}
}{
"error": {
"message": "Rate limit reached. Please retry after a short delay.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}{
"error": {
"message": "The server had an error while processing your request. Please retry.",
"type": "api_error",
"code": null,
"param": null
}
}Retrieve a video job
Poll a job for its status and result. When status is completed, the finished video is under videos[]. A video id is scoped to the key that created it.
curl --request GET \
--url https://api.deepshi.ai/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepshi.ai/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deepshi.ai/v1/videos/{video_id}', 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.deepshi.ai/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.deepshi.ai/v1/videos/{video_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.deepshi.ai/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepshi.ai/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "vid_a1b2c3",
"object": "video",
"model": "grok-imagine-video",
"status": "completed",
"size": "480p",
"seconds": "4",
"created_at": 1783695957,
"videos": [
{
"type": "url",
"url": "https://media.cdn-deepshi.com/videos/019f4c8f-....mp4",
"content_type": "video/mp4"
}
]
}{
"error": {
"message": "Incorrect API key provided.",
"type": "invalid_request_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "invalid_request_error",
"code": "model_not_found",
"param": null
}
}{
"error": {
"message": "Video not found.",
"type": "invalid_request_error",
"code": "video_not_found",
"param": "video_id"
}
}{
"error": {
"message": "Rate limit reached. Please retry after a short delay.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}{
"error": {
"message": "The server had an error while processing your request. Please retry.",
"type": "api_error",
"code": null,
"param": null
}
}Authorizations
Your Deepshi API key, sent as Authorization: Bearer <key>.
Path Parameters
The job id returned by POST /v1/videos.
Response
The video job.
A video generation job.
The job id. Pass it to the retrieve, content, and delete endpoints.
Object type, always video.
"video"
The video model id you requested.
Lifecycle state of the job.
queued, in_progress, completed, failed The resolution the job bills at.
The clip length the job bills at, in seconds.
Unix timestamp when the job was created.
Unix timestamp when the job completed.
The generated video, present when status is completed.
Show child attributes
Show child attributes
Present when status is failed. Explains the failure; the job is not charged.
Show child attributes
Show child attributes
Was this page helpful?