> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: Quickstart
description: Make your first Vakyam TTS request.
---

# Quickstart

This guide takes you from an API key to a saved audio file.

## 1. Get an API key

Create an API key from the
[Vakyam dashboard](https://dashboard.vakyam.ai/api-keys).
Keys look like `vak_live_...` and are shown only once at creation, so store yours
securely.

See [Authentication](/authentication) for how keys are validated.

## 2. Set your key as an environment variable

```bash
export VAKYAM_API_KEY="vak_live_..."
```

## 3. Synthesize speech

#### Python

```python
from vakyamai import VakyamAI

client = VakyamAI()  # reads VAKYAM_API_KEY

response = client.tts.generate(
    text="வணக்கம், நான் வாக்யம் AI பேசுகிறேன்.",
    model_id="raaga-v1",
    voice="Archana",
    language="ta-IN",
    output_format="mp3",
)

response.save("speech.mp3")
print(response.duration_seconds, "seconds")
```



#### JavaScript

```ts
import { VakyamAI } from "@vakyam-ai/tts";
import { writeFile } from "node:fs/promises";

const client = new VakyamAI({ apiKey: process.env.VAKYAM_API_KEY! });

const speech = await client.tts.generate({
  text: "வணக்கம், நான் வாக்யம் AI பேசுகிறேன்.",
  model_id: "raaga-v1",
  voice: "Archana",
  language: "ta-IN",
  output_format: "mp3",
});

await writeFile("speech.mp3", speech.audioBytes);
```



#### cURL

```bash
curl https://api.vakyam.ai/v1/tts/generate \
  -H "Authorization: Bearer $VAKYAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "வணக்கம், நான் வாக்யம் AI பேசுகிறேன்.",
    "model_id": "raaga-v1",
    "voice": "Archana",
    "language": "ta-IN",
    "output_format": "mp3"
  }'
```

The JSON response contains base64-encoded audio plus metadata:

```json
{
  "audio": "SUQzBAAAAAAA...",
  "format": "mp3",
  "duration_seconds": 2.4,
  "characters_used": 36
}
```

With cURL, decode the `audio` field to get the raw file:

```bash
echo "<base64-audio>" | base64 --decode > speech.mp3
```

## 4. Discover voices

Not sure which `voice` and `language` combinations exist? List them:

#### Python

```python
voices = client.voices.list(group_by="language")
print(voices)
```



#### JavaScript

```ts
const voices = await client.voices.list({ groupBy: "language" });
console.log(voices);
```



#### cURL

```bash
curl https://api.vakyam.ai/v1/voices \
  -H "Authorization: Bearer $VAKYAM_API_KEY"
```

## Next steps

- [Voices & languages](/concepts/voices-and-languages) — Browse supported voices and language codes.



- [Streaming](/guides/http-streaming) — Lower the time-to-first-byte with streaming.

---

*Powered by [holocron.so](https://holocron.so)*
