Estimate AI Video Credits
Send the same body as Generate an AI Video and get the credits it would cost, without generating anything.
Updated
POST
/v1/ai/video/estimatecurl -X POST "https://api.orshot.com/v1/ai/video/estimate" \
-H "Authorization: Bearer <ORSHOT_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"prompt": "<PROMPT>",
"imageRef": "<IMAGE_REF>",
"script": "<SCRIPT>",
"duration": 1
}'const res = await fetch("https://api.orshot.com/v1/ai/video/estimate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
"prompt": "<PROMPT>",
"imageRef": "<IMAGE_REF>",
"script": "<SCRIPT>",
"duration": 1
}),
});
const data = await res.json();import requests
response = requests.post(
"https://api.orshot.com/v1/ai/video/estimate",
headers={"Authorization": "Bearer <ORSHOT_API_KEY>"},
json={
"prompt": "<PROMPT>",
"imageRef": "<IMAGE_REF>",
"script": "<SCRIPT>",
"duration": 1
},
)
data = response.json()$ch = curl_init("https://api.orshot.com/v1/ai/video/estimate");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <ORSHOT_API_KEY>",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"prompt" => "<PROMPT>",
"imageRef" => "<IMAGE_REF>",
"script" => "<SCRIPT>",
"duration" => 1
]));
$data = json_decode(curl_exec($ch), true);
curl_close($ch);require "net/http"
require "json"
uri = URI("https://api.orshot.com/v1/ai/video/estimate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer <ORSHOT_API_KEY>"
req["Content-Type"] = "application/json"
req.body = {
"prompt": "<PROMPT>",
"imageRef": "<IMAGE_REF>",
"script": "<SCRIPT>",
"duration": 1
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Same body as Generate an AI Video. Returns what the request would cost so you can check it against the account's AI credits before spending.
POST https://api.orshot.com/v1/ai/video/estimateRequest Body#
Accepts every field of Generate an AI Video.
promptStringWhat to generate.
imageRefStringReference image for animation or speech.
scriptStringSpoken text; its length decides the clip length for speech.
durationNumberAny whole number of seconds from 3 to 15, capped by your plan.
fullHdBoolean1080p output at 2x credits.
Request#
await fetch("https://api.orshot.com/v1/ai/video/estimate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
prompt: "a sneaker drops onto wet asphalt at night, neon reflections",
duration: 10,
fullHd: true,
}),
});{
"data": {
"capability": "t2v",
"credits": 60,
"seconds": 10,
"tier": "fhd"
}
}Was this page helpful?
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 50+ integrations
- White-label embed for your own app
- 30 free credits — no credit card required