Skip to main content
hexgrad avatar

Kokoro-82M API

hexgrad/kokoro-82m

Turn text into natural-sounding speech with 46 voices across 6 languages, billed by compute time at a fraction of a cent per clip.

A4000,RTX4000
0.0000695

Model Input

Input

Text to synthesize into speech. Long text is automatically split and synthesized in sequence.

Speaker voice. 46 voices across 6 languages, selected by one field: American and British English, French, Hindi, Italian, Japanese, and Mandarin Chinese. The two-letter prefix encodes language and gender (af_/am_ American English, bf_/bm_ British English, ff_ French, hf_/hm_ Hindi, if_/im_ Italian, jf_/jm_ Japanese, zf_/zm_ Mandarin Chinese; f = female, m = male). Pick a voice whose language matches your text.

Additional Settings

Customize your input with more control.

Min: 0.1 - Max: 5

Speech speed multiplier (0.5 = half speed, 2.0 = double speed).

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Loading
Generated in 0.36 seconds
Logs (1 lines)

Model Example Requests

Examples

Kokoro-82M API

Kokoro-82M is a sound AI model by hexgrad. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at about $0.0000695 per audio clip.

POST https://queue.modelrunner.run/hexgrad/kokoro-82m

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/hexgrad/kokoro-82m \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Across six languages and forty-six voices, one calm British narrator can open every chapter with quiet authority.",
    "speed": 1,
    "voice": "bm_george",
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/hexgrad/kokoro-82m/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/hexgrad/kokoro-82m/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("hexgrad/kokoro-82m", {
  input: {
    "text": "Across six languages and forty-six voices, one calm British narrator can open every chapter with quiet authority.",
    "speed": 1,
    "voice": "bm_george"
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/hexgrad/kokoro-82m",
    headers=headers,
    json={
      "text": "Across six languages and forty-six voices, one calm British narrator can open every chapter with quiet authority.",
      "speed": 1,
      "voice": "bm_george"
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

Input parameters of Kokoro-82M
NameTypeRequiredDescription
textstringyesText to synthesize into speech. Long text is automatically split and synthesized in sequence.
voiceenumnoSpeaker voice. 46 voices across 6 languages, selected by one field: American and British English, French, Hindi, Italian, Japanese, and Mandarin Chinese. The two-letter prefix encodes language and gender (af_/am_ American English, bf_/bm_ British English, ff_ French, hf_/hm_ Hindi, if_/im_ Italian, jf_/jm_ Japanese, zf_/zm_ Mandarin Chinese; f = female, m = male). Pick a voice whose language matches your text. One of: af_alloy, af_aoede, af_bella, 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, bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis, ff_siwis, hf_alpha, hf_beta, hm_omega, hm_psi, if_sara, im_nicola, jf_alpha, jf_gongitsune, jf_nezumi, jf_tebukuro, jm_kumo, zf_xiaobei, zf_xiaoni, zf_xiaoxiao, zf_xiaoyi, zm_yunjian, zm_yunxi, zm_yunxia, zm_yunyang. Default: "af_bella".
speednumbernoSpeech speed multiplier (0.5 = half speed, 2.0 = double speed). Default: 1.

Machine-readable: OpenAPI schema · llms.txt

Use Kokoro-82M from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Kokoro-82M becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint hexgrad/kokoro-82m.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run hexgrad/kokoro-82m on ModelRunner to generate sound”. MCP setup guide.

Model Details

Model Details

Kokoro-82M is a compact, open-weight text-to-speech model that turns written text into natural spoken audio and returns a hosted WAV file. Its standout is reach for the price: a single endpoint speaks 46 named voices across 6 languages — American and British English, French, Hindi, Italian, Japanese, and Mandarin Chinese — chosen with one `voice` field, with no separate per-language model and no reference recording to clone. At just 82 million parameters it runs fast and bills by compute time, so a typical line costs a fraction of a cent, well under character-priced speech services. Long text is split and synthesized automatically, and you can set a speaking rate.

## Best for - Cheap, fast voiceover and narration for videos, demos, and app prototypes - Multilingual text-to-speech from one endpoint across English, French, Hindi, Italian, Japanese, and Chinese - Long-form narration for audiobooks or articles, where text is split and read in sequence - Picking from a bank of 46 named voices without training or a reference clip - High-volume speech generation where per-clip cost matters

## Choose another model when - You need to clone a specific person's voice from a sample — this model has a fixed voice bank and no reference-audio input; use a voice-cloning TTS model such as `resemble-ai/chatterbox/text-to-speech` - You need SSML, emotion tags, or fine emotional control — this endpoint takes plain text only; use an expressive, controllable TTS model - You need wide per-language voice choice in a non-English language (French and Italian have only one or two voices here) — use a dedicated multilingual TTS with broader coverage

## Tips - Match the voice to your text's language: write French and pick `ff_siwis`, not an English voice, for correct pronunciation - The prefix letter also sets gender — `*f_` voices are female, `*m_` are male - Pass full paragraphs in `text`; long input is split and synthesized automatically - Use `speed` (0.1–5, default 1) to adjust pace, and keep it near 1 for the most natural delivery

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("hexgrad/kokoro-82m", { input: { text: "Bonjour, ceci est un test de synthèse vocale.", voice: "ff_siwis", speed: 1, }, }); ```