# aura 2

<details>

<summary>This documentation is valid for the following list of our models</summary>

<table data-header-hidden data-full-width="true"><thead><tr><th width="237.46649169921875"></th><th></th></tr></thead><tbody><tr><td><code>#g1_aura-2-amalthea-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-amalthea-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-andromeda-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-andromeda-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-apollo-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-apollo-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-arcas-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-arcas-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-aries-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-aries-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-asteria-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-asteria-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-athena-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-athena-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-atlas-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-atlas-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-aurora-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-aurora-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-cora-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-cora-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-cordelia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-cordelia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-delia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-delia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-draco-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-draco-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-electra-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-electra-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-harmonia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-harmonia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-helena-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-helena-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-hera-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-hera-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-hermes-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-hermes-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-hyperion-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-hyperion-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-iris-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-iris-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-janus-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-janus-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-juno-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-juno-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-jupiter-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-jupiter-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-luna-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-luna-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-mars-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-mars-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-minerva-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-minerva-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-neptune-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-neptune-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-odysseus-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-odysseus-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-ophelia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-ophelia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-orion-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-orion-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-orpheus-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-orpheus-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-pandora-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-pandora-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-phoebe-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-phoebe-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-pluto-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-pluto-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-saturn-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-saturn-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-selene-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-selene-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-thalia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-thalia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-theia-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-theia-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-vesta-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-vesta-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-zeus-en</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-zeus-en" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-celeste-es</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-celeste-es" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-estrella-es</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-estrella-es" class="button primary">Try in Playground</a></td></tr><tr><td><code>#g1_aura-2-nestor-es</code></td><td><a href="https://aimlapi.com/app/-g1_aura-2-nestor-es" class="button primary">Try in Playground</a></td></tr></tbody></table>

</details>

## Model Overview

Aura 2 produces natural, human-like speech with accurate domain-specific pronunciation — covering drug names, legal terms, alphanumeric strings, and structured inputs such as dates, times, and currency. It also maintains sub-200 ms TTFB latency and offers cost-efficient scalability.

## Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).

## API Schema

## POST /v1/tts

>

```json
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/v1/tts":{"post":{"operationId":"_v1_tts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["aura-2-amalthea-en","#g1_aura-2-amalthea-en","#g1_aura-2-andromeda-en","#g1_aura-2-apollo-en","#g1_aura-2-arcas-en","#g1_aura-2-aries-en","#g1_aura-2-asteria-en","#g1_aura-2-athena-en","#g1_aura-2-atlas-en","#g1_aura-2-aurora-en","#g1_aura-2-callista-en","#g1_aura-2-cora-en","#g1_aura-2-cordelia-en","#g1_aura-2-delia-en","#g1_aura-2-electra-en","#g1_aura-2-harmonia-en","#g1_aura-2-helena-en","#g1_aura-2-hera-en","#g1_aura-2-hermes-en","#g1_aura-2-hyperion-en","#g1_aura-2-iris-en","#g1_aura-2-janus-en","#g1_aura-2-juno-en","#g1_aura-2-jupiter-en","#g1_aura-2-luna-en","#g1_aura-2-mars-en","#g1_aura-2-minerva-en","#g1_aura-2-neptune-en","#g1_aura-2-odysseus-en","#g1_aura-2-ophelia-en","#g1_aura-2-orion-en","#g1_aura-2-orpheus-en","#g1_aura-2-pandora-en","#g1_aura-2-phoebe-en","#g1_aura-2-pluto-en","#g1_aura-2-saturn-en","#g1_aura-2-selene-en","#g1_aura-2-thalia-en","#g1_aura-2-theia-en","#g1_aura-2-vesta-en","#g1_aura-2-zeus-en","#g1_aura-2-celeste-es","#g1_aura-2-estrella-es","#g1_aura-2-nestor-es"]},"text":{"type":"string","description":"The text content to be converted to speech."},"container":{"type":"string","description":"The file format wrapper for the output audio. The available options depend on the encoding type."},"encoding":{"type":"string","enum":["linear16","mulaw","alaw","mp3","opus","flac","aac"],"default":"linear16","description":"Specifies the expected encoding of your audio output"},"sample_rate":{"type":"string","description":"Audio sample rate in Hz."},"stream":{"type":"boolean","default":true}},"required":["model","text"],"title":"aura-2-amalthea-en"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"uri"},"meta":{"type":"object","nullable":true,"properties":{"usage":{"type":"object","nullable":true,"properties":{"credits_used":{"type":"number","description":"The number of tokens consumed during generation."},"usd_spent":{"type":"number","description":"The total amount of money spent by the user in USD."}},"required":["credits_used","usd_spent"]}},"description":"Additional details about the generation."}},"required":["audio"]}},"audio/wav":{"schema":{"type":"string","format":"binary","description":"Audio stream"}}}}}}}}}
```

## Code Example

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" %}

```python
import os
import requests

def main():
    url = "https://api.aimlapi.com/v1/tts"
    headers = {
        # Insert your AI/ML API key instead of <YOUR_AIMLAPI_KEY>:
        "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
    }
    payload = {
        "model": "#g1_aura-2-helena-en",
        "text": '''
        Cities of the future promise to radically transform how people live, work, and move. 
        Instead of sprawling layouts, we’ll see vertical structures that integrate residential, work, and public spaces into single, self-sustaining ecosystems. 
        Architecture will adapt to climate conditions, and buildings will be energy-efficient—generating power through solar panels, wind turbines, and even foot traffic.
    '''
    }
    response = requests.post(url, headers=headers, json=payload, stream=True)
    
    # result = os.path.join(os.path.dirname(__file__), "audio.wav")  # if you run this code as a .py file
    
    result = "audio.wav"  # if you run this code in Jupyter Notebook

    with open(result, "wb") as write_stream:
        for chunk in response.iter_content(chunk_size=8192):
            if chunk:
                write_stream.write(chunk)

    print("Audio saved to:", result)


main()
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code overflow="wrap" %}

```javascript
const https = require("https");
const fs = require("fs");

// Insert your AI/ML API key instead of <YOUR_AIMLAPI_KEY>:
const apiKey = "<YOUR_AIMLAPI_KEY>";

const data = JSON.stringify({
  model: "#g1_aura-2-helena-en",
  text: `
Cities of the future promise to radically transform how people live, work, and move. 
Instead of sprawling layouts, we’ll see vertical structures that integrate residential, work, and public spaces into single, self-sustaining ecosystems. 
Architecture will adapt to climate conditions, and buildings will be energy-efficient—generating power through solar panels, wind turbines, and even foot traffic.
  `
});

const options = {
  hostname: "api.aimlapi.com",
  path: "/v1/tts",
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Content-Length": Buffer.byteLength(data),
  }
};

const req = https.request(options, (res) => {
  if (res.statusCode >= 400) {
    let error = "";
    res.on("data", chunk => error += chunk);
    res.on("end", () => {
      console.error(`Error ${res.statusCode}:`, error);
    });
    return;
  }

  const file = fs.createWriteStream("audio.wav");
  res.pipe(file);

  file.on("finish", () => {
    file.close();
    console.log("Audio saved to audio.wav");
  });
});

req.on("error", (e) => {
  console.error("Request error:", e);
});

req.write(data);
req.end();
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

```
Audio saved to: audio.wav
```

</details>

The generated audio:

{% embed url="<https://drive.google.com/file/d/1NaJcoNwVNXGybIK64eMD9qSt9yR4-Nwp/view?usp=sharing>" %}

***
