mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 01:07:08 +00:00
1 line
2.8 KiB
JSON
1 line
2.8 KiB
JSON
{"text":["Models","Microsoft","phi-4","Phi 4","Phi 4, through one API key.","Get API key","Try in Chat","Specifications","Context Window","16K","Modalities","text","Price","$0.078 in · $0.156 out, per million tokens","Model ID","microsoft/phi-4","Quick start","Get an API key →","TypeScript","Python","cURL","Go","import","OpenAI","from","openai","const","client = new","({","apiKey","process.env.HANZO_API_KEY","baseURL","https://api.hanzo.ai/v1","})","response =","await","client.chat.completions.","create","model","messages","[{","role","user","content","Hello!","}]","console.","log","response.choices",".message.content","client = OpenAI","api_key=os","environ","HANZO_API_KEY","],","base_url=","response = client","chat","completions","model=","messages=","print","response","choices","].","message","curl","https://api.hanzo.ai/v1/chat/completions","-H","Content-Type: application/json","Authorization: Bearer","-d","\"model\": \"microsoft/phi-4\",","\"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]","package","main","context","fmt","os","github.com/sashabaranov/go-openai","func","()","cfg := openai","DefaultConfig","Getenv","))","cfg","BaseURL =","client := openai","NewClientWithConfig","resp","_ := client","CreateChatCompletion","Background","(),","ChatCompletionRequest","Model","Messages","[]","ChatCompletionMessage","Role","ChatMessageRoleUser","Content","},","Println","Choices","Message","More from Microsoft","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...","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...","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...","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...","View all Microsoft models →","Use Phi 4 via Hanzo AI","One API key. Every major model. OpenAI-compatible. Start free.","Get an API key","Browse All Models"],"links":["/models","/models/microsoft","https://platform.hanzo.ai/api-keys","/chat","/models/microsoft/mai-voice-2","/models/microsoft/mai-voice-2-flash","/models/microsoft/mai-voice-2.1","/models/microsoft/mai-voice-2.1-flash"]} |