Delete a segment
curl --request DELETE \
--url https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id} \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://api.rask.ai/v3/projects/{project_id}/segments/{segment_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.rask.ai/v3/projects/{project_id}/segments/{segment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"If-Match: <if-match>"
],
]);
$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.rask.ai/v3/projects/{project_id}/segments/{segment_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
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.delete("https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "transcript_edit_result",
"segments": [],
"deleted_segment_ids": [
"2c7e9a4f-3d1b-4f8e-a6c2-9b5d1f3e7a33"
],
"operations": [
{
"index": 0,
"segment_ids": [
"2c7e9a4f-3d1b-4f8e-a6c2-9b5d1f3e7a33"
]
}
],
"effects": {
"needs_redub_segment_ids": [],
"audio_dropped_segment_ids": [],
"retranslation": null,
"speakers_pending_voice": [],
"instant_clone_settings_reset": [],
"restore_point_version": null,
"project_needs_redub": true
},
"warnings": []
}Segments
Delete a segment
Deletes a segment of the live transcript.
DELETE
/
projects
/
{project_id}
/
segments
/
{segment_id}
Delete a segment
curl --request DELETE \
--url https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id} \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://api.rask.ai/v3/projects/{project_id}/segments/{segment_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.rask.ai/v3/projects/{project_id}/segments/{segment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"If-Match: <if-match>"
],
]);
$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.rask.ai/v3/projects/{project_id}/segments/{segment_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
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.delete("https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "transcript_edit_result",
"segments": [],
"deleted_segment_ids": [
"2c7e9a4f-3d1b-4f8e-a6c2-9b5d1f3e7a33"
],
"operations": [
{
"index": 0,
"segment_ids": [
"2c7e9a4f-3d1b-4f8e-a6c2-9b5d1f3e7a33"
]
}
],
"effects": {
"needs_redub_segment_ids": [],
"audio_dropped_segment_ids": [],
"retranslation": null,
"speakers_pending_voice": [],
"instant_clone_settings_reset": [],
"restore_point_version": null,
"project_needs_redub": true
},
"warnings": []
}Its translation variants come back only through restoreTranscriptVersion or a new retranslateSegments; createSegment cannot write variants.
When to use: to remove a segment.
Side effects: Commits atomically: the project’s
pipeline_status becomes transcript_edited, segment ETags change, affected segments become outdated (listed in the response’s effects) and their audio may be dropped. The dub no longer matches (effects.project_needs_redub).
Cost: Free.
Idempotency: Idempotency-Key accepted (SDKs send one): a same-key retry within 24 h replays the first response (Idempotent-Replayed: true); a repeat without a key answers 404 segment_not_found (hard delete).
Concurrency: If-Match with the current segment ETag is required (428 if missing or *, 412 with current_etag if stale). On 412 re-read, re-apply once and retry. Refused during processing (409 project_not_ready) and while a dub runs, from its start until its merge ends or it fails (409 dub_in_progress); 409 transcript_busy means concurrent writes kept conflicting: retry after Retry-After.
Paid text: on a project created through v3, 409 dub_payment_required until a dub of that project is charged.
Required scopes: transcripts:write
Errors: transcript_not_ready (409), segment_busy (409), project_not_ready (409), dub_in_progress (409), transcript_busy (409), dub_payment_required (409)Authorizations
Headers
Path Parameters
Response
OK: TranscriptEditResult.
Result of a segment or transcript mutation. Transient (no id).