hexgrad: Kokoro 82M
hexgrad’s Kokoro 82M generates speech with a compact, 82-million-parameter model and a language-specific preset voice. Its documented v1.0 profile includes eight languages, 54 voices and 24 kHz audio output.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
Kokoro 82M is hexgrad’s open-weight text-to-speech model with eighty-two million parameters. Its model card describes a compact, decoder-only architecture based on StyleTTS 2 and iSTFTNet. Written text is converted to pronunciation information and then speech in a selected voice. The documented v1.0 release provides fifty-four voices across eight languages; that profile is distinct from the earlier English-only v0.19 release.
Select a matching language and voice
The voice catalogue covers American and British English, Japanese, Mandarin Chinese, Spanish, French, Hindi, Italian and Brazilian Portuguese. The two English accents are variants of one language. Voice names and language settings belong together: af_heart is an American English example in the official workflow, while the catalogue has separate groups for the other languages and accents.
Choose the speaker with the actual material it will read. A short course narration can use one consistent preset voice across its sections; a multilingual collection can select a voice from each required language group. The catalogue’s coverage differs between groups. French, for example, is represented by one listed voice rather than the larger selection available for English.
Prepare pronunciation and passages
Kokoro’s reference pipeline converts written forms into phonemes. Its examples allow an explicit phonetic reading for a term, so a difficult name can be prepared rather than left to an ambiguous spelling. Keep the surrounding sentence natural and preserve the wording the listener should hear.
A practical passage is: “The guide has three parts. First, choose the material. Next, compare the examples. Finally, save the version you want to use.” Write complete phrases and keep the pauses implied by punctuation. For a long piece, organise the input into coherent paragraphs instead of treating the whole document as one uninterrupted utterance.
The voice guide says many speakers perform best with passages of about 100–200 tokens within an approximately 500-token span. It notes weaknesses on very short utterances, particularly below 10–20 tokens, and a tendency to rush longer passages, especially beyond 400 tokens. These are token-based preparation observations, not word-count or recording-duration limits. Combining short fragments or splitting a long passage can provide a more suitable unit of speech.
Audio output and pace
The official workflow yields the processed text, phonemes and an audio result for each generated segment. It saves those segments as WAV at 24,000 Hz and exposes a speed setting in the reference pipeline. Keep the segment text and order associated with the audio so the assembled narration follows the intended script.
A useful editing check is to listen across the boundary between two passages, then inspect recurring names and the pacing of lists. The audio output and phoneme view serve different purposes: one is the recording the listener hears, the other helps inspect how the written text is being pronounced.
Language coverage and useful limits
The maker explicitly notes that non-English support can be thin because pronunciation processing or voice-training data is limited. Its preset groups therefore should not be treated as equal guarantees of delivery for every passage. Choose a suitable speaker and review the real names and phrasing required by the task.
The useful deliverable is a spoken passage or assembled narration using a documented preset voice, with text prepared around its pronunciation and passage-length needs. This profile follows the maker’s v1.0 Kokoro 82M materials; another checkpoint, quantised implementation or externally modified voice has its own technical scope.
Ailoot Ultra · Text to speech POST /v1/audio/speech hexgrad/kokoro-82m
hexgrad/kokoro-82mOverview
hexgrad’s Kokoro 82M generates speech with a compact, 82-million-parameter model and a language-specific preset voice. Its documented v1.0 profile includes eight languages, 54 voices and 24 kHz audio output.
- Accepted inputs
- Text
- Results
- Audio
Available in Ailoot · inputs & methods
Ailoot Ultra · Text to speech POST /v1/audio/speech
- Input types
text- Output types
audio- Output format
- mp3
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits hexgrad/kokoro-82m | Default— |
Fieldinput | Typestring | RequirementRequired | Values & limits Minimum length: 1 Unit: Unicode characters | Default— |
Fieldvoice | Typestring | RequirementRequired | Values & limits af_alloy, af_aoede, af_bella, af_heart, af_jessica, af_kore, af_nicole, af_nova, af_river, af_sarah, af_sky, am_adam, am_echo, am_eric, am_fenrir, am_liam, am_michael, am_onyx, am_puck, am_santa, bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis, ef_dora, em_alex, em_santa, ff_siwis, hf_alpha, hf_beta, hm_omega, hm_psi, if_sara, im_nicola, jf_alpha, jf_gongitsune, jf_nezumi, jf_tebukuro, jm_kumo, pf_dora, pm_alex, pm_santa, zf_xiaobei, zf_xiaoni, zf_xiaoxiao, zf_xiaoyi, zm_yunjian, zm_yunxi, zm_yunxia, zm_yunyang | Default— |
Fieldresponse_format | Typestring | RequirementRequired | Values & limits mp3 | Default— |
Input material combinations
text_to_speech · Required: input
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, input, voice, response_format |
Parametervoice_ids | Contractaf_alloy, af_aoede, af_bella, af_heart, af_jessica, af_kore, af_nicole, af_nova, af_river, af_sarah, af_sky, am_adam, am_echo, am_eric, am_fenrir, am_liam, am_michael, am_onyx, am_puck, am_santa, bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis, ef_dora, em_alex, em_santa, ff_siwis, hf_alpha, hf_beta, hm_omega, hm_psi, if_sara, im_nicola, jf_alpha, jf_gongitsune, jf_nezumi, jf_tebukuro, jm_kumo, pf_dora, pm_alex, pm_santa, zf_xiaobei, zf_xiaoni, zf_xiaoxiao, zf_xiaoyi, zm_yunjian, zm_yunxi, zm_yunxia, zm_yunyang |
Parameterresponse_format | Contractmp3 |
Parametermax_input_characters | Contractnull |
Parameterother_options | Contractfalse |
Parameterinput | Contractexact UTF-8 text; Unicode character count without normalization |
Parametermaterial_types | Contracttext |
Lifecycle: synchronous_result_then_owned_library
GET /v1/media/tasks/{task_id} · actual returned task_id or media library record
GET /v1/media/assets/{asset_id}/content
GET /v1/media/assets
GET /v1/media/assets/{asset_id}
Select exact voice from this model profile.
Input characters and audio seconds are different meters.
Pricing
Tariff references do not add request options. Supported parameters are listed for the selected method.
- Fast mode
- Not specified When fast mode is selected
- Flex mode
- Not specified When flex mode is selected
- Maximum reasoning effort
- Not specified When maximum reasoning effort uses the default adjustment
Ailoot rates
Prices by configuration
Match each charge to the conditions shown. Use one rate for each set of alternative configurations.
| Configuration | Rate schedule | Billable quantity | Billing unit | Charge |
|---|---|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Billable quantity— | Billing unit— | Charge Input · Input tokens — / 1K tokens Output · Output tokens — / 1K tokens Input · Cache read — / 1K tokens Input · Cache write — / 1K tokens Input · Cache write, 1 hour — / 1K tokens |
| ConfigurationUltra | Rate schedule— | Billable quantityEach Unicode code point counts as one character, including Han characters. | Billing unitper 1000 input character | Charge Input · input character $0.008 per 1000 input character |
Reference tariff details
Model-level reference schedules do not change method selection, quotes or charges. Active charges use the selected Ailoot method rates.
hexgrad: Kokoro 82M
Prices by configuration
| Configuration | Billing conditions | Charge |
|---|---|---|
| Configurationhexgrad: Kokoro 82M · Default configuration | Billing conditionsDefault configuration | Charge Input · Input characters $0.00000124 per input character |
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Example requests
Ailoot Ultra · Text to speech
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_VOICE_ID:?Choose an accepted voice ID from this exact model profile}"
export AILOOT_VOICE_ID
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "hexgrad/kokoro-82m", "input": "Good afternoon! This is a short voice take."}')
voice=os.environ["AILOOT_VOICE_ID"]
allowed=json.loads('["af_alloy", "af_aoede", "af_bella", "af_heart", "af_jessica", "af_kore", "af_nicole", "af_nova", "af_river", "af_sarah", "af_sky", "am_adam", "am_echo", "am_eric", "am_fenrir", "am_liam", "am_michael", "am_onyx", "am_puck", "am_santa", "bf_alice", "bf_emma", "bf_isabella", "bf_lily", "bm_daniel", "bm_fable", "bm_george", "bm_lewis", "ef_dora", "em_alex", "em_santa", "ff_siwis", "hf_alpha", "hf_beta", "hm_omega", "hm_psi", "if_sara", "im_nicola", "jf_alpha", "jf_gongitsune", "jf_nezumi", "jf_tebukuro", "jm_kumo", "pf_dora", "pm_alex", "pm_santa", "zf_xiaobei", "zf_xiaoni", "zf_xiaoxiao", "zf_xiaoyi", "zm_yunjian", "zm_yunxi", "zm_yunxia", "zm_yunyang"]')
if voice not in allowed: raise SystemExit("Choose an accepted voice ID from this exact model profile")
p["voice"]=voice
p["response_format"]="mp3"
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/audio/speech \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o speech.mp3
Receive and save results
Ailoot Ultra · Text to speech
mp3
GET /v1/media/tasks/{task_id}GET /v1/media/assets/{asset_id}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
Other content reads
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/media/assets \
-H "Authorization: Bearer $AILOOT_API_KEY" -o media-assets.json
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_MEDIA_TASK_ID:?Set the actual ID returned by the response or media-library metadata}"
export AILOOT_MEDIA_TASK_ID
resource_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_MEDIA_TASK_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/media/tasks/$resource_id" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o media-task.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("media-task.json").read_text())))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_ASSET_ID:?Set the actual ID returned by the response or media-library metadata}"
export AILOOT_ASSET_ID
resource_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_ASSET_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/media/assets/$resource_id" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o media-asset.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("media-asset.json").read_text())))
PY_RESULT
Keep all completed results
Keep every complete returned response, file and content part.
Keep the complete binary result and headers. If JSON/multiple outputs are returned, retain every data item and fetch each actual signed asset URL.
If the original response needs checking
Retain original operation_id/X-Client-Request-ID for reconciliation without resubmission; no dedicated audio poll route.
Response fields
| Field | Type |
|---|---|
Fieldbinary audio | Typebytes |
Fieldresponse headers | Typeheaders |
Errors and next steps
| Response | Condition | Next step |
|---|---|---|
Response400 · invalid_request_error | ConditionInvalid required fields, material representation or parameter value | Next stepCorrect the indicated fields before a new creation request. |
Responseserver_error | ConditionThe returned response says the operation or result requires a check | Next stepKeep the original returned operation/task ID, request headers and response; continue supported reads of that original operation. Do not resubmit the creation request. |
Aliases
Model aliases
Ailoot Ultra hexgrad/kokoro-82m
Method path aliases
Use the method paths shown above.
Related caller IDs
FAQ · hexgrad: Kokoro 82M
- What inputs and results are available?
POST /v1/audio/speech·hexgrad/kokoro-82m:text→audio- Which fields does the request use?
POST /v1/audio/speech·hexgrad/kokoro-82m:model,input,voice,response_format