GPT-4o mini TTS
OpenAI’s GPT-4o mini TTS: text to speech in eleven voices, with instructions for tone and pace.
- मॉडल ID
openai/gpt-4o-mini-tts- एंडपॉइंट
POST /v1/audio/speech
मूल्य
एक कॉल की लागत, आधिकारिक मूल्य के साथ: यानी उसी मॉडल और सेटिंग के लिए मॉडल के अपने विक्रेता का सूची मूल्य।
| लागू होता है | Minu | आधिकारिक मूल्य | आधिकारिक मूल्य की तुलना में |
|---|---|---|---|
| हर अनुरोधप्रति मिनट | $0.00375 | $0.015 | 75% कम |
टेक्स्ट-टू-स्पीच की बिलिंग हर जवाब के बाद, बने हुए ऑडियो की अवधि के हिसाब से होती है। जिस अनुरोध से कोई ऑडियो नहीं बनता, उसका कोई शुल्क नहीं लगता।
आधिकारिक मूल्य वह सूची मूल्य है जो मॉडल का विक्रेता उसी मॉडल और सेटिंग के लिए प्रकाशित करता है, जैसा हमारे कैटलॉग में दर्ज है। यह बदल सकता है; वर्तमान आँकड़े के लिए विक्रेता का अपना मूल्य पेज देखें।
अनुरोध का उदाहरण
आधिकारिक OpenAI SDK जैसे हैं वैसे काम करते हैं: baseURL को https://api.minu.ai/v1 पर सेट करें और अपनी Minu key का उपयोग करें। जवाब ही ऑडियो फ़ाइल है।
curl https://api.minu.ai/v1/audio/speech \
-H "Authorization: Bearer $MINU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini-tts",
"voice": "alloy",
"input": "Your order has shipped and will arrive on Friday."
}' \
--output speech.mp3import fs from 'node:fs';
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.MINU_API_KEY,
baseURL: 'https://api.minu.ai/v1',
});
const speech = await client.audio.speech.create({
model: 'openai/gpt-4o-mini-tts',
voice: 'alloy',
input: 'Your order has shipped and will arrive on Friday.',
});
await fs.promises.writeFile('speech.mp3', Buffer.from(await speech.arrayBuffer()));import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MINU_API_KEY"],
base_url="https://api.minu.ai/v1",
)
speech = client.audio.speech.create(
model="openai/gpt-4o-mini-tts",
voice="alloy",
input="Your order has shipped and will arrive on Friday.",
)
speech.write_to_file("speech.mp3")इनपुट पैरामीटर
model, input (टेक्स्ट) और voice के साथ एक JSON बॉडी भेजें। voice इनमें से एक हो: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse। instructions, response_format और speed वैकल्पिक हैं।