--- title: "Real-time API Reference" section: "Real-time translation" order: 1 sidebarLabel: "API Reference" --- ## Authentication All API requests require authentication using a Bearer token in the `Authorization` header.
/api/beta1/session
{
"url": "wss://…",
"token": "…",
"room_name": "api-…"
}
{
"source_language": "string",
"target_language": "string",
"voice_type": "string"
}
{
"source_language": "en-US",
"target_language": "es-ES",
"voice_type": "clone"
}
{
"url": "string",
"token": "string",
"room_name": "string"
}
{
"url": "wss://pinch-prod-interpreter-jgw70la3.livekit.cloud",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiQVBJIENsaWVudCIsInZpZGVvIjp7InJvb21Kb2luIjp0cnVlLCJyb29tIjoiYXBpLTQ0YTcwMTk2IiwiY2FuUHVibGlzaCI6dHJ1ZSwiY2FuU3Vic2NyaWJlIjp0cnVlLCJjYW5QdWJsaXNoRGF0YSI6dHJ1ZSwiY2FuVXBkYXRlT3duTWV0YWRhdGEiOnRydWV9LCJpc3MiOiJBUEl1TU1wN0J4dGROSDkiLCJleHAiOjE3NzA4NjcxMDcsIm5iZiI6MCwic3ViIjoiY2xpZW50LTQ0YTcwMTk2In0.2UpXCF-eLULMBNUvXCqT_oOwVUmshVvjJVxGVa6FihE",
"room_name": "api-44a70196"
}
{
"error": {
"code": "invalid_language",
"message": "Unsupported target language: xx-XX"
}
}
{
"error": {
"code": "invalid_token",
"message": "Invalid or expired API token"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests"
}
}
{
"error": {
"code": "internal_error",
"message": "An internal error occurred"
}
}