MeloTTS API: Pricing, Documentation

by MyShell

MeloTTS API provides a lightweight yet powerful text-to-speech framework optimized for instantaneous audio generation. It excels at transforming raw text into highly expressive, human-like voice outputs with minimal processing overhead. The system features advanced accent control and multi-lingual capabilities, ensuring natural phonetic phrasing across various global dialects. Because of its efficient design, the interface integrates seamlessly into resource-constrained applications, virtual assistants, and automated narration systems. It stands as a reliable, scalable asset for developers seeking top-tier acoustic performance and smooth architectural deployment.

Get API Key
MeloTTS API

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

MeloTTS API Documentation

A multi-lingual open text-to-speech model from MyShell, and by a wide margin the cheapest voice in the catalogue. Output is WAV rather than MP3. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio.

POST https://gateway.pixazo.ai/melotts/v1/text-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Speech - MeloTTS

Request Code

POST https://gateway.pixazo.ai/melotts/v1/text-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "text": "Hello from Pixazo. This is a text to speech demo."
}
import requests

url = "https://gateway.pixazo.ai/melotts/v1/text-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "text": "Hello from Pixazo. This is a text to speech demo."
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/melotts/v1/text-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "text": "Hello from Pixazo. This is a text to speech demo."
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/melotts/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"text": "Hello from Pixazo. This is a text to speech demo."}'

Output

{
  "request_id": "melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/melotts/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"text": "Hello from Pixazo. This is a text to speech demo."}'

Callback Payload (success)

{
  "request_id": "melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "melotts",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp3"
    ],
    "media_type": "audio/mpeg"
  },
  "created_at": "2026-08-01T09:14:16.102Z",
  "completed_at": "2026-08-01T09:14:22.870Z"
}

Failure callback shape

{
  "request_id": "melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "melotts",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstringup to 2,000 charactersThe text to speak. text is accepted as an alias.
langNostringenen, es, fr, zh, jp, krLanguage of the input text. MeloTTS has one voice per language rather than a voice list.

Voices

One voice per language across English, Spanish, French, Chinese, Japanese and Korean.

Example Request

{
  "text": "Hello from Pixazo. This is a text to speech demo."
}

Example Response

{
  "request_id": "melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — a missing or out-of-range parameter. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
429Too many requests.
500Internal server error.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED (or ERROR), then download output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "melotts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "melotts",
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp3"
    ],
    "media_type": "audio/mpeg"
  },
  "created_at": "2026-08-01T09:14:16.102Z",
  "completed_at": "2026-08-01T09:14:22.870Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
output.media_urlarrayURL of the generated audio file.
output.media_typestringMIME type of the audio.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.

Status Values & Flow

QUEUEDPROCESSINGCOMPLETED (success) or ERROR (failure).

Pricing

Billed at $0.0002 per minute of generated audio, rounded up to the next whole minute. You are charged for the audio produced, not the text you submit.

Audio producedBilled minutesCost
A 10-second clip1$0.0002
A 45-second clip1$0.0002
A 3-minute narration3$0.0006
A 10-minute narration10$0.002

Failed requests are not billed.

MeloTTS API Pricing

Your request will cost $0.0002 per minute of generated audio.
a 45-second clip is billed as one minute, $0.0002
equivalent to $0.012 per hour of audio

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
300last 30d
~10 per day
Success rate
66.7%
of completed generations
Generation time
92.8savg
p95 92.8s
Requests
Jul 16max 100Aug 14
MeloTTSAvg 10/day
Generation Time
Jul 16max 107.2sAug 14
MeloTTSAvg 92.8s
Error Rate
Jul 16max 100.0%Aug 14
MeloTTSAvg 33.3%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
66.67%
across all generations of this model family
Uptime
Jul 16max 100%Aug 14
SuccessfulAvg 66.67%