# MAI-Voice-2-Flash — Use via Hanzo AI API

> MAI-Voice-2-Flash is a low-latency text-to-speech model from Microsoft AI f... Call via Hanzo&#x27;s OpenAI-compatible API.

[Models](https://hanzo.ai/models)/[Microsoft](https://hanzo.ai/models/microsoft)/mai-voice-2-flash

Microsoft

# MAI-Voice-2-Flash

MAI-Voice-2-Flash, through one API key.

[Get API key](https://platform.hanzo.ai/api-keys)[Try in Chat](https://hanzo.ai/chat)

## Specifications

Modalitiesspeech

Price…

Model IDmicrosoft/mai-voice-2-flash

## Quick start

[Get an API key →](https://platform.hanzo.ai/api-keys)

TypeScript

Python

cURL

Go

TypeScript

```
import OpenAI from &#x27;openai&#x27; const client = new OpenAI({ apiKey: process.env.HANZO_API_KEY, baseURL: &#x27;https://api.hanzo.ai/v1&#x27; }) const response = await client.chat.completions.create({ model: &#x27;microsoft/mai-voice-2-flash&#x27;, messages: [{ role: &#x27;user&#x27;, content: &#x27;Hello!&#x27; }] }) console.log(response.choices[0].message.content)
```

Python

```
from openai import OpenAI client = OpenAI( api_key=os.environ["HANZO_API_KEY"], base_url="https://api.hanzo.ai/v1" ) response = client.chat.completions.create( model="microsoft/mai-voice-2-flash", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
```

cURL

```
curl https://api.hanzo.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $HANZO_API_KEY" \ -d &#x27;{ "model": "microsoft/mai-voice-2-flash", "messages": [{"role": "user", "content": "Hello!"}] }&#x27;
```

Go

```
package main import ( "context" "fmt" "os" "github.com/sashabaranov/go-openai" ) func main() { cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY")) cfg.BaseURL = "https://api.hanzo.ai/v1" client := openai.NewClientWithConfig(cfg) resp, _ := client.CreateChatCompletion(context.Background(), openai.ChatCompletionRequest{ Model: "microsoft/mai-voice-2-flash", Messages: []openai.ChatCompletionMessage{ {Role: openai.ChatMessageRoleUser, Content: "Hello!"}, }, }, ) fmt.Println(resp.Choices[0].Message.Content) }
```

…

## More from Microsoft

[MAI-Voice-2MAI-Voice-2 is an expressive text-to-speech model from Microsoft AI. It is suited for conversational assistants, media narration, accessibility, education, and other long-form voice applications. It supports 15 languages across 18...](https://hanzo.ai/models/microsoft/mai-voice-2)[MAI-Voice-2.1MAI-Voice-2.1 is Microsoft AI&#x27;s highest-fidelity, most expressive text-to-speech model. It produces natural, studio-grade speech across 23 languages, with detailed prosody, nuanced expressiveness, and speaker consistency over long-form content. It is...](https://hanzo.ai/models/microsoft/mai-voice-2.1)[MAI-Voice-2.1-FlashMAI-Voice-2.1-Flash is a low-latency text-to-speech model from Microsoft AI, optimized for real-time responsiveness. It produces natural, expressive speech across 23 languages, with human-like intonation, rhythm, and emotional nuance. It is...](https://hanzo.ai/models/microsoft/mai-voice-2.1-flash)[Phi 416K[Microsoft Research](/microsoft) Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...](https://hanzo.ai/models/microsoft/phi-4)[WizardLM-2 8x22B66KWizardLM-2 8x22B is Microsoft AI&#x27;s most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models. It is...](https://hanzo.ai/models/microsoft/wizardlm-2-8x22b)

[View all Microsoft models →](https://hanzo.ai/models/microsoft)

## Use MAI-Voice-2-Flash via Hanzo AI

One API key. Every major model. OpenAI-compatible. Start free.

[Get an API key](https://platform.hanzo.ai/api-keys)[Browse All Models](https://hanzo.ai/models)
