Crear proyecto
curl --request POST \
--url https://api.voicecheap.ai/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"sourceSrt": "<string>"
}
'import requests
url = "https://api.voicecheap.ai/v1/projects"
payload = {
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"sourceSrt": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLanguage: '<string>',
originalLanguage: '<string>',
projectName: '<string>',
webhookUrl: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
sourceSrt: '<string>'
})
};
fetch('https://api.voicecheap.ai/v1/projects', 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.voicecheap.ai/v1/projects",
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([
'targetLanguage' => '<string>',
'originalLanguage' => '<string>',
'projectName' => '<string>',
'webhookUrl' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'sourceSrt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.voicecheap.ai/v1/projects"
payload := strings.NewReader("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.voicecheap.ai/v1/projects")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyTraducción
Crear proyecto
Suba un archivo de vídeo o audio y cree un proyecto sin iniciar la traducción
Crear proyecto
curl --request POST \
--url https://api.voicecheap.ai/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"sourceSrt": "<string>"
}
'import requests
url = "https://api.voicecheap.ai/v1/projects"
payload = {
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"sourceSrt": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLanguage: '<string>',
originalLanguage: '<string>',
projectName: '<string>',
webhookUrl: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
sourceSrt: '<string>'
})
};
fetch('https://api.voicecheap.ai/v1/projects', 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.voicecheap.ai/v1/projects",
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([
'targetLanguage' => '<string>',
'originalLanguage' => '<string>',
'projectName' => '<string>',
'webhookUrl' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'sourceSrt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.voicecheap.ai/v1/projects"
payload := strings.NewReader("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.voicecheap.ai/v1/projects")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCrear proyecto
Cree un nuevo proyecto subiendo un archivo de vídeo o audio. La API inicia solo la transcripción (sin traducción ni sincronización labial). Puede abrir el proyecto en la aplicación VoiceCheap más tarde para activar la traducción, o utilizar Obtener detalles del proyecto para inspeccionar el estado del proyecto.Límite de concurrencia
Este endpoint comparte el mismo límite de concurrencia quePOST /v1/translate: hasta 10 traducciones en curso por cuenta. Si se alcanza el límite, las solicitudes devuelven CONCURRENT_TRANSLATION_LIMIT_REACHED (HTTP 429).
Solicitud
Este endpoint aceptamultipart/form-data con una carga de archivo.
Cabeceras
string
requerido
Su clave de API de VoiceCheap. Obtenga una en app.voicecheap.ai/page-api.
Parámetros del cuerpo
file
requerido
El archivo de vídeo o audio a subir.Formatos de vídeo admitidos:
video/mp4, video/quicktime, video/x-matroska, video/webm, video/mpegFormatos de audio admitidos: audio/mpeg, audio/wav, audio/mp4, audio/x-m4a, audio/flac, audio/ogg, audio/aac, audio/webmTamaño máximo de archivo por plan: Beginner 5 GB, Starter 10 GB, Creator 20 GB, Pro 30 GB, Scale 40 GB y Enterprise 60 GB.string
requerido
El idioma de destino a asociar con este proyecto. Debe estar en minúsculas.Valores permitidos (70+):
afrikaans, albanian, amharic, arabic, armenian, assamese, azerbaijani, basque, belarusian, bengali, bosnian, bulgarian, catalan, croatian, czech, danish, dutch, english, british english, estonian, finnish, french, french canadian, galician, german, greek, gujarati, hebrew, hindi, hungarian, icelandic, indonesian, irish, italian, japanese, kannada, kazakh, khmer, korean, lao, latvian, lithuanian, macedonian, malay, malayalam, mandarin, marathi, mongolian, nepali, norwegian, persian, polish, portuguese, brazilian portuguese, punjabi, romanian, russian, serbian, slovak, slovenian, spanish, swahili, swedish, tagalog, tamil, telugu, thai, turkish, ukrainian, urdu, vietnamese, welsh, yoruba, zulustring
El idioma de origen del contenido utilizando códigos de idioma ISO (p. ej., Predeterminado:
en, es, fr, de, ja, zh).Altamente recomendado: déjelo vacío para la detección automática.Solo proporcione este parámetro si está 100% seguro de que el código de idioma es correcto y tiene un formato ISO válido. Los códigos de idioma incorrectos provocarán fallos en la transcripción. Nuestra detección automática admite más de 80 idiomas y es altamente precisa.
auto-detectstring
Un nombre personalizado para el proyecto. Útil para identificar proyectos en su panel de control.Predeterminado: Se utilizará el ID del proyecto si no se proporciona.
string
Un endpoint https que recibe el eventos de webhook para este proyecto,
anulando el endpoint configurado en su cuenta.Predeterminado: El endpoint de webhook de la cuenta, cuando hay uno configurado.
string
auto-detect o un número entero de 1 a 32. Proporcionar el número conocido de hablantes puede mejorar la diarización.Predeterminado: auto-detectstring
Una matriz de cadenas JSON de nombres, marcas, acrónimos o términos especializados específicos de la solicitud. Estos términos se fusionan con el glosario guardado de la cuenta o del equipo.
["VoiceCheap", "SmartSync", "ITC Global"]
boolean
Eliminar palabras de relleno comunes durante la transcripción.Predeterminado:
truestring
Una transcripción SRT existente en el idioma de origen. Cuando se suministra,
originalLanguage debe ser un código de idioma explícito en lugar de auto-detect.POST /v1/translate.
Ejemplo de solicitud
curl -X POST "https://api.voicecheap.ai/v1/projects" \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@/path/to/video.mp4" \
-F "targetLanguage=french" \
-F "projectName=Launch Demo" \
-F "numberOfSpeakers=2" \
-F 'brandVocabulary=["VoiceCheap","SmartSync"]' \
-F "removeFillerWords=true"
Ejemplo de respuesta
{
"success": true,
"message": "Project created. Transcription started.",
"projectId": "project_123",
"projectName": "Launch Demo",
"targetLanguage": "french",
"status": "processing"
}
Errores
| Estado | Código | Descripción |
|---|---|---|
| 400 | FILE_REQUIRED | No se cargó ningún archivo con la solicitud |
| 400 | INVALID_FILE_TYPE | El tipo de archivo cargado no es compatible |
| 400 | DURATION_DETECTION_FAILED | No se pudo detectar la duración del archivo cargado |
| 400 | INVALID_MULTIPART_REQUEST | Los datos del formulario multipart están mal formados o exceden los límites de campo |
| 400 | INVALID_BRAND_VOCABULARY | Una entrada del glosario específica de la solicitud no es válida |
| 400 | INVALID_SOURCE_SRT | El SRT de origen proporcionado está mal formado |
| 400 | SOURCE_LANGUAGE_REQUIRED_FOR_SRT | sourceSrt requiere un originalLanguage explícito |
| 400 | VIDEO_TOO_LONG | La duración del medio excede el límite del plan del usuario |
| 413 | FILE_TOO_LARGE | El archivo cargado excede el límite del plan del usuario |
| 401 | MISSING_API_KEY | Se requiere la clave API |
| 401 | INVALID_API_KEY_FORMAT | La clave API debe comenzar con vc_ |
| 401 | INVALID_API_KEY | La clave API proporcionada no es válida |
| 403 | API_ACCESS_REQUIRED | Se requiere acceso a la API para esta cuenta |
| 403 | SUBSCRIPTION_REQUIRED | El acceso a la API requiere una suscripción de pago |
| 429 | RATE_LIMIT_EXCEEDED | Demasiadas solicitudes (límite: 10 solicitudes por minuto) |
| 429 | CONCURRENT_TRANSLATION_LIMIT_REACHED | Demasiadas traducciones en curso (límite: 10 traducciones simultáneas) |
| 500 | INTERNAL_ERROR | Error inesperado del servidor |
¿Esta página le ayudó?

