Estimate voicing chosen segments
curl --request POST \
--url https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"segment_ids": [
"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11",
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
]
}
'import requests
url = "https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate"
payload = { "segment_ids": ["5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11", "8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"] }
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({
segment_ids: ['5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11', '8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22']
})
};
fetch('https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate', 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.rask.ai/v3/projects/{project_id}/segments/generate/estimate",
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([
'segment_ids' => [
'5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11',
'8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22'
]
]),
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://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate"
payload := strings.NewReader("{\n \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\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.rask.ai/v3/projects/{project_id}/segments/generate/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate")
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 \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "estimate",
"action": "segment_generation",
"project_id": "6f1c2b7e-8a4d-4e3f-9b5c-1d0a7e2f3c58",
"eligible": true,
"reasons": [],
"notices": [],
"costs": [
{
"credit_type": "minutes",
"minutes": 1,
"feature": "segment_generation",
"charged_when": "on_request",
"basis": {
"billable_seconds": 7,
"multiplier": null
}
}
],
"total_minutes": 1,
"total_projects": 0,
"balance_after": {
"minutes": 187,
"lipsync_free_minutes": null,
"projects": null
},
"spend_limit": {
"limit_minutes": 500,
"spent_minutes": 120,
"remaining_minutes": 380,
"limit_projects": null,
"spent_projects": 3,
"remaining_projects": null,
"resets_at": "2026-12-01T00:00:00Z"
},
"details": {
"action": "segment_generation",
"segment_ids_to_voice": [
"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11",
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"speech_seconds": 6.6,
"billable_minutes": 1,
"pricing_rule": "selected_speech",
"engine": "meaning_first",
"text_adaptation": "as_written",
"processing_scope": {
"synthesis": "requested_segments",
"voice_setup": "requested_speakers"
}
}
}Dubbing
Estimate voicing chosen segments
Runs every check of generateSegments without writing and returns an Estimate.
POST
/
projects
/
{project_id}
/
segments
/
generate
/
estimate
Estimate voicing chosen segments
curl --request POST \
--url https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"segment_ids": [
"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11",
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
]
}
'import requests
url = "https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate"
payload = { "segment_ids": ["5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11", "8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"] }
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({
segment_ids: ['5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11', '8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22']
})
};
fetch('https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate', 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.rask.ai/v3/projects/{project_id}/segments/generate/estimate",
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([
'segment_ids' => [
'5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11',
'8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22'
]
]),
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://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate"
payload := strings.NewReader("{\n \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\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.rask.ai/v3/projects/{project_id}/segments/generate/estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v3/projects/{project_id}/segments/generate/estimate")
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 \"segment_ids\": [\n \"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11\",\n \"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "estimate",
"action": "segment_generation",
"project_id": "6f1c2b7e-8a4d-4e3f-9b5c-1d0a7e2f3c58",
"eligible": true,
"reasons": [],
"notices": [],
"costs": [
{
"credit_type": "minutes",
"minutes": 1,
"feature": "segment_generation",
"charged_when": "on_request",
"basis": {
"billable_seconds": 7,
"multiplier": null
}
}
],
"total_minutes": 1,
"total_projects": 0,
"balance_after": {
"minutes": 187,
"lipsync_free_minutes": null,
"projects": null
},
"spend_limit": {
"limit_minutes": 500,
"spent_minutes": 120,
"remaining_minutes": 380,
"limit_projects": null,
"spent_projects": 3,
"remaining_projects": null,
"resets_at": "2026-12-01T00:00:00Z"
},
"details": {
"action": "segment_generation",
"segment_ids_to_voice": [
"5f0e2c7a-1b3d-4e6f-8a9c-2d4e6f8a0b11",
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"speech_seconds": 6.6,
"billable_minutes": 1,
"pricing_rule": "selected_speech",
"engine": "meaning_first",
"text_adaptation": "as_written",
"processing_scope": {
"synthesis": "requested_segments",
"voice_setup": "requested_speakers"
}
}
}Runs every check of generateSegments without writing and returns an Estimate:
segment_ids_to_voice, speech seconds, price, engine, text_adaptation and processing_scope, with eligibility, reasons and balance_after. Speech is synthesized only for the chosen segments; processing_scope.voice_setup says plainly when the engine may also read other speakers’ speech to prepare cloned voices (notice wider_voice_setup). That work is not charged. Without a previous dub, the notice clips_not_reusable says that the first dub voices and charges these segments again. This charge does not open the text (dub_payment_required).
When to use: before generateSegments; send total_minutes as expected_cost_minutes.
Side effects: None.
Cost: Free. Does not need credits:spend.
Idempotency: no side effects; an Idempotency-Key is accepted and ignored, so every call is fresh.
Required scopes: dubbing:writeAuthorizations
Headers
Path Parameters
Body
application/json
Same body as generateSegments.
Response
OK: Estimate.
A side-effect-free quote produced by the action's own checks. Transient: carries object, no id.
The action an estimate prices. Discriminator of details.
create_project: createProjectcreate_project_copies: createProjectCopiesdub: createDublipsync: createLipsynconscreen: createOnscreensegment_generation: generateSegmentslocalization: createLocalization, resumeJob
Available options:
create_project, create_project_copies, dub, lipsync, onscreen, segment_generation, localization