Patch project
curl --request PATCH \
--url https://api.rask.ai/v2/projects/{project_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"num_speakers": 123,
"voice": {}
}
'import requests
url = "https://api.rask.ai/v2/projects/{project_id}"
payload = {
"name": "<string>",
"num_speakers": 123,
"voice": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', num_speakers: 123, voice: {}})
};
fetch('https://api.rask.ai/v2/projects/{project_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/v2/projects/{project_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'num_speakers' => 123,
'voice' => [
]
]),
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/v2/projects/{project_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.rask.ai/v2/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v2/projects/{project_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source_type": "youtube",
"created_at": "2023-11-07T05:31:56Z",
"status": "created",
"status_updated_at": "2023-11-07T05:31:56Z",
"cover": "<string>",
"src_lang": "<string>",
"dst_lang": "<string>",
"num_speakers": 123,
"source_url": "<string>",
"duration": 123,
"original_duration": 123,
"glossary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"glossary_version": 123,
"original_video": "<string>",
"transcript_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceover": "<string>",
"translated_video": "<string>",
"translated_audio": "<string>",
"voice": {},
"translation_srt_path": "<string>",
"translation_vtt_path": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Project
Patch Project - Update Project Settings
PATCH request to update a project’s name, number of speakers or speaker voice assignment in the Rask AI API. Parameters and response schema.
PATCH
/
v2
/
projects
/
{project_id}
Patch project
curl --request PATCH \
--url https://api.rask.ai/v2/projects/{project_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"num_speakers": 123,
"voice": {}
}
'import requests
url = "https://api.rask.ai/v2/projects/{project_id}"
payload = {
"name": "<string>",
"num_speakers": 123,
"voice": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', num_speakers: 123, voice: {}})
};
fetch('https://api.rask.ai/v2/projects/{project_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/v2/projects/{project_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'num_speakers' => 123,
'voice' => [
]
]),
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/v2/projects/{project_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.rask.ai/v2/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rask.ai/v2/projects/{project_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"num_speakers\": 123,\n \"voice\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source_type": "youtube",
"created_at": "2023-11-07T05:31:56Z",
"status": "created",
"status_updated_at": "2023-11-07T05:31:56Z",
"cover": "<string>",
"src_lang": "<string>",
"dst_lang": "<string>",
"num_speakers": 123,
"source_url": "<string>",
"duration": 123,
"original_duration": 123,
"glossary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"glossary_version": 123,
"original_video": "<string>",
"transcript_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceover": "<string>",
"translated_video": "<string>",
"translated_audio": "<string>",
"voice": {},
"translation_srt_path": "<string>",
"translation_vtt_path": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Patched project
Current project status
Available options:
created, uploading, uploaded, upload_failed, transcription_started, transcription_done, transcription_failed, transcribe_segments_started, transcribe_segments_done, transcribe_segments_failed, separate_background_started, separate_background_done, separate_background_failed, determine_speakers_started, determine_speakers_done, determine_speakers_failed, voice_suggest_started, voice_suggest_done, voice_suggest_failed, translation_started, translation_done, translation_failed, voice_update_started, voice_update_done, voice_update_failed, transcript_edited, voice_edited, voiceover_started, voiceover_done, voiceover_failed, merging_started, merging_done, merging_failed, failed, no_audio, no_words, forbidden_link