> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bakbak.si/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bakbak.si/_mcp/server.

# List voices

GET https://hub.getraya.app/v1/voices

Returns a list of all available voices with their IDs, names, supported languages, and model.
Each voice belongs to a specific model (`standard` or `m1`). Use the `model` field from the response when calling TTS endpoints — a voice ID from one model will not work with the other.


Reference: https://docs.bakbak.si/api-reference/voices/list-voices

## Authentication

- `X-API-Key` header (required) — API key for authentication. Example: raya_ABCD1234567890abcdef

## Response

### 200

Successful response with list of voices

- `voices` (list of Voice, optional) — List of available voices
- `count` (integer, optional) — Total number of available voices

## Errors

### 401 Unauthorized Error

Unauthorized - Invalid or missing API key

- `detail` (string, optional) — Error message describing what went wrong

### 500 Internal Server Error

Internal server error

- `detail` (string, optional) — Error message describing what went wrong

## Types

### Voice

- `id` (string, optional) — Unique identifier for the voice
- `name` (string, optional) — Human-readable name of the voice
- `language` (enum, optional) — Language code supported by this voice. Currently supported: hi (Hindi), mr (Marathi), te (Telugu), kn (Kannada), bn (Bengali), as (Assamese), gu (Gujarati), ne (Nepali), ml (Malayalam), ta (Tamil), en-in (Indian English), en-us (US English). More languages are coming soon.
  - Allowed values: `hi`, `mr`, `te`, `kn`, `bn`, `as`, `gu`, `ne`, `ml`, `ta`, `en`, `en-in`, `en-us`
- `model` (enum, optional) — The synthesis model this voice belongs to. Use the same value in the `model` field when calling TTS endpoints.
  - Allowed values: `standard`, `m1`

## Examples

**Response**

```json
{
  "voices": [
    {
      "id": "voice_001",
      "name": "Hindi Female Voice",
      "language": "hi",
      "model": "standard"
    },
    {
      "id": "voice_002",
      "name": "Marathi Male Voice",
      "language": "mr",
      "model": "m1"
    }
  ],
  "count": 2
}
```

**SDK Code**

```python Voices_getVoices_example
import requests

url = "https://hub.getraya.app/v1/voices"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Voices_getVoices_example
const url = 'https://hub.getraya.app/v1/voices';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Voices_getVoices_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://hub.getraya.app/v1/voices"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Voices_getVoices_example
require 'uri'
require 'net/http'

url = URI("https://hub.getraya.app/v1/voices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Voices_getVoices_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://hub.getraya.app/v1/voices")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

```php Voices_getVoices_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://hub.getraya.app/v1/voices', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Voices_getVoices_example
using RestSharp;

var client = new RestClient("https://hub.getraya.app/v1/voices");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Voices_getVoices_example
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://hub.getraya.app/v1/voices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```