mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 01:07:08 +00:00
105 lines
3.6 KiB
JSON
105 lines
3.6 KiB
JSON
[
|
|
[
|
|
{
|
|
"a": "Models",
|
|
"href": "/models"
|
|
},
|
|
{
|
|
"a": "Microsoft",
|
|
"href": "/models/microsoft"
|
|
},
|
|
{
|
|
"h1": "Phi 4"
|
|
},
|
|
{
|
|
"p": "Phi 4, through one API key."
|
|
},
|
|
{
|
|
"a": "Get API key",
|
|
"href": "https://platform.hanzo.ai/api-keys"
|
|
},
|
|
{
|
|
"a": "Try in Chat",
|
|
"href": "/chat"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"h2": "Specifications"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"h2": "Quick start"
|
|
},
|
|
{
|
|
"a": "Get an API key →",
|
|
"href": "https://platform.hanzo.ai/api-keys"
|
|
},
|
|
{
|
|
"button": "TypeScript"
|
|
},
|
|
{
|
|
"button": "Python"
|
|
},
|
|
{
|
|
"button": "cURL"
|
|
},
|
|
{
|
|
"button": "Go"
|
|
},
|
|
{
|
|
"code": "import OpenAI from ' openai ' const client = new OpenAI ({ apiKey : process.env.HANZO_API_KEY , baseURL : ' https://api.hanzo.ai/v1 ' }) const response = await client.chat.completions. create ({ model : ' microsoft/phi-4 ' , messages : [{ role : ' user ' , content : ' Hello! ' }] }) console. log ( response.choices [ 0 ] .message.content )"
|
|
},
|
|
{
|
|
"code": "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/phi-4 \" , messages= [{ \" role \" : \" user \" , \" content \" : \" Hello! \" }] ) print ( response . choices [ 0 ]. message . content )"
|
|
},
|
|
{
|
|
"code": "curl https://api.hanzo.ai/v1/chat/completions \\ -H \" Content-Type: application/json \" \\ -H \" Authorization: Bearer $ HANZO_API_KEY \" \\ -d ' { \"model\": \"microsoft/phi-4\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}] } '"
|
|
},
|
|
{
|
|
"code": "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/phi-4 \" , Messages : [] openai . ChatCompletionMessage { { Role : openai . ChatMessageRoleUser , Content : \" Hello! \" }, }, }, ) fmt . Println ( resp . Choices [ 0 ]. Message . Content ) }"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"h2": "More from Microsoft"
|
|
},
|
|
{
|
|
"a": "MAI-Voice-2 MAI-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...",
|
|
"href": "/models/microsoft/mai-voice-2"
|
|
},
|
|
{
|
|
"a": "MAI-Voice-2-Flash MAI-Voice-2-Flash is a low-latency text-to-speech model from Microsoft AI for voice agents, assistants, call centers, accessibility, narration, and other interactive applications. It generates expressive 24 kHz mono speech across 15...",
|
|
"href": "/models/microsoft/mai-voice-2-flash"
|
|
},
|
|
{
|
|
"a": "MAI-Voice-2.1 MAI-Voice-2.1 is Microsoft AI'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...",
|
|
"href": "/models/microsoft/mai-voice-2.1"
|
|
},
|
|
{
|
|
"a": "MAI-Voice-2.1-Flash MAI-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...",
|
|
"href": "/models/microsoft/mai-voice-2.1-flash"
|
|
},
|
|
{
|
|
"a": "View all Microsoft models →",
|
|
"href": "/models/microsoft"
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"h2": "Use Phi 4 via Hanzo AI"
|
|
},
|
|
{
|
|
"p": "One API key. Every major model. OpenAI-compatible. Start free."
|
|
},
|
|
{
|
|
"a": "Get an API key",
|
|
"href": "https://platform.hanzo.ai/api-keys"
|
|
},
|
|
{
|
|
"a": "Browse All Models",
|
|
"href": "/models"
|
|
}
|
|
]
|
|
] |