Dùng AI Max ngay trong Claude, ChatGPT, Grok, Perplexity hoặc Mistral? Không cần API key.Xem trang Kết nối AI MCP →
Text To Speech
v3Creates a voice task from text. Send form data (multipart, urlencoded or JSON). voice_id carries its source as a prefix: elevenlabs_, minimax_, edge_, vbee_, fishaudio_, or clone_<id> for a voice you cloned. Credits are held when the task is created and settled when it ends; read the task with or pass receive_url.
Yêu cầu
curl -X POST "https://aimax.biz/v3/text-to-speech" \
-H "xi-api-key: $API_KEY" \
-F text="Xin chào, đây là API v3." \
-F voice_id="edge_vi-VN-HoaiMyNeural" \
-F speed="1" \
-F with_transcript="false" \
-F receive_url="https://your-site.com/api/callback"- voice_id: stringBắt buộc. Prefixed voice id from the .
- text: stringBắt buộc. Max 1,000,000 characters.
- speed: numberTùy chọn. Range 0.5–1.5.Mặc định:
1 - with_transcript: booleanTùy chọn. Also make an SRT subtitle file (
metadata.srt_url).Mặc định:false - file_name: stringTùy chọn. Name for the downloaded files (without extension).
- receive_url: stringTùy chọn. Callback address:
https://, a public host name, port 443 or 1024–65535. See . - pronunciation_dictionary_id: stringTùy chọn. The
idof one of your own (only the audio changes). - auto_fit: booleanTùy chọn. "Sync SRT timeline": only when
textis a clean SRT file — measures the reading, has the AI shorten the subtitles that did not fit and reads again. Silently does nothing on anything else (check the response'sauto_fit_started).Mặc định:false - auto_fit_relax: intTùy chọn. 0–40: how much extra room to leave each subtitle when shortening (0 = only what is needed to fit). Only read with
auto_fit.Mặc định:0 - Idempotency-Key: headerTùy chọn. 1–64 characters. Sending the same key again returns the same task and holds credits once: use it when a request may be retried.
Ví dụ phản hồi thành công
{
"success": true,
"task_id": "uuid_task_id",
"ec_remain_credits": 99620,
"estimated_credits": 380
}Khi task kết thúc, chúng tôi POST kết quả tới receive_url của bạn; hoặc bạn tự hỏi lại bằng
estimated_credits is what is held for the task; the final credit_cost is on the finished task and is usually lower.
Need several MP3 files from one long text (the Studio's "Split into MP3 files")? See .
Text To Speech (batch)
v3Several voice tasks from one call: every text becomes its own task, with the same voice and settings. Send either items (a JSON array you already split, up to 200) or one long text with split_mode for the server to split it itself. Nothing is held or sent to the provider by this call: each task is created as a slot frees up (the engine allows 3 running at a time per account), whether or not you call again. Poll the batch to see each task's id and status; once a task has its task_id it is an ordinary task ().
One long text, split into pieces
curl -X POST "https://aimax.biz/v3/text-to-speech/batch" \
-H "xi-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_id": "edge_vi-VN-HoaiMyNeural",
"text": "Chương 1…\n\nChương 2…\n\nChương 3…",
"split_mode": "paragraph"
}'Several texts of your own, with file names
curl -X POST "https://aimax.biz/v3/text-to-speech/batch" \
-H "xi-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice_id": "edge_vi-VN-HoaiMyNeural",
"items": [
{ "text": "Episode one…", "file_name": "ep1" },
{ "text": "Episode two…", "file_name": "ep2" }
]
}'- voice_id: stringBắt buộc. Prefixed voice id from the .
- items: arrayTùy chọn. A JSON array of strings, or
{text, file_name}objects, up to 200. Not withtext. - text: stringTùy chọn. One long text for the server to split itself. Not with
items; needssplit_mode. - split_mode: stringTùy chọn.
paragraph(split on a blank line) orline(every line break). Only withtext. A clean SRT is split by its cues instead, whatever this says. - speed: numberTùy chọn. Range 0.5–1.5, shared by every piece.Mặc định:
1 - with_transcript: booleanTùy chọn. Also make an SRT subtitle file for every piece.Mặc định:
false - pronunciation_dictionary_id: stringTùy chọn. The
idof one of your own , shared by every piece. - auto_fit: booleanTùy chọn. "Sync SRT timeline" for every
itemspiece that is itself a clean, whole SRT file (never for a piece made bysplit_mode: a split piece is one line, not a timed file).Mặc định:false - auto_fit_relax: intTùy chọn. 0–40, the slider that goes with
auto_fit.Mặc định:0 - Idempotency-Key: headerTùy chọn. 1–64 characters. Sending the same key with the same texts again stores nothing twice (
addedis 0,existingcounts them).
Ví dụ phản hồi thành công
{
"success": true,
"batch_id": "uuid_batch_id",
"status": "running",
"total": 3,
"added": 3,
"existing": 0
}Limits: 50,000 waiting files / 500,000,000 waiting characters across your batches (429 queue_full), 50 batches not finished at a time (429 too_many_batches).
GET the collection for your open (not yet finished) batches; GET one batch for its items, each with its task_id once the server has made it, its status (queued, created, failed, cancelled) and the error code when it failed.
PATCH {"action": "pause"} lets files already sent finish and holds the rest; "resume" starts it again; "cancel" drops every file still waiting (files already sent are untouched).
Voice Library
v3Lists the voices of every source in one format. Use the returned voice_id as it is (it is already prefixed) in , , the and .
Yêu cầu
curl "https://aimax.biz/v3/voices?provider=edge&language=Vietnamese&gender=female&page=1&page_size=30" \
-H "xi-api-key: $API_KEY"- provider: stringBắt buộc.
elevenlabs,minimax,edge,vbee,fishaudio,clone(your own cloned voices), orpopular(the voices AI Max shares with everyone, usable by any account;accentholds the region: north, central, south). - search / q: stringTùy chọn. Search the name, id, description and tags.
- page: intTùy chọn. Page number.Mặc định:
1 - page_size / limit: intTùy chọn. Voices per page, max 60.Mặc định:
30 - cursor: stringTùy chọn.
pagination.next_cursorof the previous page: the way to read deep into a long list (pagereaches at most 1,200 voices deep). - filters: stringTùy chọn.
language(exactly the value of a voice'slanguagefield: an English name such asVietnameseforminimaxandvbee, a locale such asvi-VNforedge, a code such asviforelevenlabs),gender,age,accent,category: one value each.voice_ownershipforvbee.
Ví dụ phản hồi thành công
{
"success": true,
"format_version": "2026-11-16",
"data": [
{
"voice_id": "edge_vi-VN-HoaiMyNeural",
"name": "Hoài My",
"language": "Vietnamese",
"gender": "female",
"tags": ["vi-VN", "Female"],
"preview_url": "https://aimax.biz/v1/voice-preview?u=…&s=…"
}
],
"pagination": { "page": 1, "page_size": 30, "total": 318, "has_more": true, "next_cursor": "…" }
}preview_url is a signed link on this domain to a short sample; it needs no key.
Text To Dialogue
v3Multi-speaker dialogue in one audio file. speakers is a JSON array; the labels A>, B>, C> in text map to the speakers by position. Priced like the Dialogue page.
Yêu cầu
curl -X POST "https://aimax.biz/v3/text-to-speech/dialogue" \
-H "xi-api-key: $API_KEY" \
-F text=$'A> Xin chào.\nB> Chào bạn.\nC> Mình là Edge voice.' \
-F speakers='[{"voice_id":"edge_vi-VN-HoaiMyNeural","speed":1},{"voice_id":"minimax_273554146070723","speed":1},{"voice_id":"edge_vi-VN-NamMinhNeural"}]' \
-F delay="0.4" \
-F with_transcript="true"- text: stringBắt buộc. Use the labels
A>,B>,C>. Max 50,000 characters. - speakers: JSONBắt buộc. Array of
{ voice_id, speed? }(2–26), mapped by index.speed0.5–1.5. - delay: numberTùy chọn. Gap between speakers, seconds, 0–5 in steps of 0.1.Mặc định:
0 - with_transcript: booleanTùy chọn. Top level only: do not put it inside
speakers. Addssrt_urlandjson_url.Mặc định:false - file_name / receive_url: stringTùy chọn. Name for the downloaded files, and a callback address (see ).
- pronunciation_dictionary_id: stringTùy chọn. Applies to every line (speaker labels are untouched).
Ví dụ phản hồi thành công
{
"success": true,
"task_id": "uuid_task_id",
"ec_remain_credits": 98000,
"estimated_credits": 1200
}Khi task kết thúc, chúng tôi POST kết quả tới receive_url của bạn; hoặc bạn tự hỏi lại bằng
The finished task has type: "dialogue" and metadata.audio_url (plus srt_url and json_url with a transcript).
Clone Voice
v3Creates a cloned voice from an audio sample (3–30 seconds, up to 10 MB). It costs 333 credits and is yours alone. The answer's tts_voice_id (clone_<id>) is used as voice_id in text to speech, dialogue and dubbing. The voice changer takes catalog voices only. A sample that fits in the request (about 4 MB) goes in audio_file; a bigger one is sent through and named by upload_id.
Yêu cầu
curl -X POST "https://aimax.biz/v3/text-to-speech/voice-clone" \
-H "xi-api-key: $API_KEY" \
-F voice_name="My cloned voice" \
-F consent=true \
-F audio_file=@sample.mp3- voice_name: stringBắt buộc. A name for the voice (at most 60 characters).
- audio_file: FileBắt buộc. The voice sample (mp3, wav, m4a, aac, ogg, webm or flac). Or send
upload_idinstead. - consent: booleanBắt buộc. Must be
true: you confirm that you have the right to clone this voice. AI Max stores when you did. - remove_background: booleanTùy chọn. Clean background noise from the sample first.Mặc định:
false
Ví dụ phản hồi thành công
{
"success": true,
"data": {
"voice_id": "0f3c…",
"tts_voice_id": "clone_0f3c…",
"name": "My cloned voice",
"status": "ready"
}
}voice_id is the clone's id (use it to delete it); tts_voice_id is the value to send as voice_id elsewhere. If the answer carries pending: true (HTTP 202) the service has not confirmed the clone yet: the credits stay held and it is settled or returned automatically.
You can keep up to 10 clones and create 5 an hour.
Delete Clone Voice
v3Deletes a voice you cloned. voice_clone_id is the voice_id of the clone answer (or the whole clone_<id>). Someone else's id answers 404.
Yêu cầu
curl -X DELETE "https://aimax.biz/v3/text-to-speech/voice-clone/$voice_clone_id" \
-H "xi-api-key: $API_KEY"Ví dụ phản hồi thành công
{
"success": true
}Pronunciation Dictionary
v3Rules that replace text before synthesis to fix how words are read (brand names, acronyms, foreign words). Attach one with pronunciation_dictionary_id in or : only the audio changes. JSON body. Each dictionary is yours alone.
Create
curl -X POST "https://aimax.biz/v3/dictionaries" \
-H "xi-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Brand names",
"rules": [
{ "from": "AI", "to": "Ây Ai", "matchType": "word", "caseSensitive": true },
{ "from": "vivoo", "to": "vi vu", "matchType": "contains" }
]
}'Other endpoints
GET /v3/dictionaries # list your dictionaries
GET /v3/dictionaries/{id} # get one
PUT /v3/dictionaries/{id} # update { name?, rules? }
DELETE /v3/dictionaries/{id} # delete
POST /v3/dictionaries/preview # { text, rules } -> { input, output }- name: stringBắt buộc. The dictionary's name (at most 120 characters).
- rules: arrayBắt buộc. At most 500 rules
{ from, to, matchType, caseSensitive }(fromup to 200 characters,toup to 500). - matchType: stringTùy chọn.
word(whole word) orcontains(anywhere).Mặc định:word - caseSensitive: booleanTùy chọn. Match the capitals exactly.Mặc định:
false
Ví dụ phản hồi thành công
{
"success": true,
"dictionary": { "id": "uuid_dictionary_id", "name": "Brand names", "rules": [ /* … */ ] }
}Use the returned id as pronunciation_dictionary_id. You can keep up to 20 dictionaries.