curl --request PUT \
--url https://api.pyai.com/projects/{projectId}/creation-jobs/{id} \
--header 'Content-Type: application/json' \
--cookie pyai_session= \
--data '
{
"name": "<string>",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"sourceName": "<string>"
}
'import requests
url = "https://api.pyai.com/projects/{projectId}/creation-jobs/{id}"
payload = {
"name": "<string>",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"sourceName": "<string>"
}
headers = {
"cookie": "pyai_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'pyai_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
text: '<string>',
voiceId: '<string>',
voiceName: '<string>',
sourceName: '<string>'
})
};
fetch('https://api.pyai.com/projects/{projectId}/creation-jobs/{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.pyai.com/projects/{projectId}/creation-jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'text' => '<string>',
'voiceId' => '<string>',
'voiceName' => '<string>',
'sourceName' => '<string>'
]),
CURLOPT_COOKIE => "pyai_session=",
CURLOPT_HTTPHEADER => [
"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.pyai.com/projects/{projectId}/creation-jobs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "pyai_session=")
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.put("https://api.pyai.com/projects/{projectId}/creation-jobs/{id}")
.header("cookie", "pyai_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/projects/{projectId}/creation-jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'pyai_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"product": "speak",
"name": "<string>",
"status": "queued",
"stage": "queued",
"input": {
"product": "speak",
"name": "<string>",
"format": "mp3",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"language": "",
"sourceName": "<string>"
},
"error_code": "<string>",
"charge": "not_started",
"created_at": 123,
"updated_at": 123,
"creation_id": "<string>"
}Start a durable Speech or Transcription job
Console cookie authentication and a trusted console Origin are required. Choose a client UUID prefixed crj_. Speech accepts JSON metadata. Transcription accepts multipart metadata (a JSON string) plus media (up to 25 MiB). A 202 means the input is stored and the job will continue after the browser closes. Repeat the same ID and payload after a lost response; a changed payload returns 409. Uses workspace credits through the normal product meter. Do not automatically create another ID after an uncertain response.
curl --request PUT \
--url https://api.pyai.com/projects/{projectId}/creation-jobs/{id} \
--header 'Content-Type: application/json' \
--cookie pyai_session= \
--data '
{
"name": "<string>",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"sourceName": "<string>"
}
'import requests
url = "https://api.pyai.com/projects/{projectId}/creation-jobs/{id}"
payload = {
"name": "<string>",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"sourceName": "<string>"
}
headers = {
"cookie": "pyai_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'pyai_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
text: '<string>',
voiceId: '<string>',
voiceName: '<string>',
sourceName: '<string>'
})
};
fetch('https://api.pyai.com/projects/{projectId}/creation-jobs/{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.pyai.com/projects/{projectId}/creation-jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'text' => '<string>',
'voiceId' => '<string>',
'voiceName' => '<string>',
'sourceName' => '<string>'
]),
CURLOPT_COOKIE => "pyai_session=",
CURLOPT_HTTPHEADER => [
"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.pyai.com/projects/{projectId}/creation-jobs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "pyai_session=")
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.put("https://api.pyai.com/projects/{projectId}/creation-jobs/{id}")
.header("cookie", "pyai_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/projects/{projectId}/creation-jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'pyai_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"sourceName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"product": "speak",
"name": "<string>",
"status": "queued",
"stage": "queued",
"input": {
"product": "speak",
"name": "<string>",
"format": "mp3",
"text": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"language": "",
"sourceName": "<string>"
},
"error_code": "<string>",
"charge": "not_started",
"created_at": 123,
"updated_at": 123,
"creation_id": "<string>"
}Authorizations
Console session cookie. PyAI-admin routes also require the configured platform-admin email allowlist.
Body
speak, hear 1 - 160mp3, wav, txt Speech script, up to 2,000 Unicode characters. Empty for transcription.
Required for Speech.
200200Spoken language for Transcription; empty detects it.
, en, es, fr, de, hi, it, pt, nl 240Response
Durably accepted, or the existing job for this request ID.
speak, hear queued, running, completed, failed queued, connecting, generating, transcribing, saving, completed, failed Show child attributes
Show child attributes
not_started, unconfirmed, metered Unix milliseconds.
Unix milliseconds.