Text to speech

tokenflow-tts-1

Generate speech from text using preset or described voices.

— Status from api.tokenflow.dev

Price$1.00 / audio hour
Default organization cap20 billed hours / month
InputUp to 4,000 characters / request

Try it in the console playground — you sign in first, and it uses your organization’s quota.

Quickstart

Set TOKENFLOW_API_KEY privately in your shell. This page never asks for your key or runs a request.

Speech synthesis

POST /v1/audio/speech · application/json

curl · writes speech.mp3
curl --fail-with-body 'https://api.tokenflow.dev/v1/audio/speech' \
  -H "Authorization: Bearer $TOKENFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "tokenflow-tts-1",
  "input": "你好,欢迎使用语音服务。",
  "voice": "zh-female-calm"
}' \
  --output speech.mp3

  • Input and instructions must contain non-whitespace text.
  • Choose voice or instructions, never both. Instructions cannot contain parentheses.
  • Formats as OpenAI names them: mp3 (default), opus, aac, flac, wav, pcm. pcm is 24 kHz 16-bit little-endian mono, streamed or not. Streaming takes pcm (default) or opus.
  • Every audio response names its origin in the x-aigc-label header; mp3, aac, opus, flac and wav also carry it in the file. Keep it when you store or pass audio on.
  • No cloning from your own recordings. Disclose AI speech and preserve origin metadata.

Performance

Live figures from api.tokenflow.dev

First byte, median
—
Speed, × real time
—
Success
—
Last 7 days: one row per UTC day; today so far in the last row.
DayFirst byteSpeedSuccess
————
————
————
————
————
————
————
How these are measured

Live figures cover all API traffic in the last 24 hours and refresh every minute; a figure with too few requests in the last 24 hours shows the last 7 UTC days instead, marked 7d. First token is the median time from request to the first streamed token, at any prompt length. Output is output tokens per second after the first token, over answers of 16 tokens or more. First byte (speech synthesis) is the median time from request until the first bytes of the response reach our gateway: for a whole file that can be most of the request, and the first bytes may be the file's header rather than sound. Response time (transcription) is the median time for the whole request. Speed is seconds of audio per second of request time, over successful requests; a client that reads a stream slowly, or a speed setting, changes it, and a stream cut off part-way counts with the audio it delivered. The speech synthesis figures include internal traffic served by the same engine. Success is the share of the requests we record that did not fail on our side; client errors such as a bad request or an exhausted quota do not count against it. Each figure needs at least 20 requests behind it (for a timing or speed, 20 successful requests it can be measured on); until then it shows a dash.

Parameters & limits

Input text
Up to 4,000 characters
Voice description
Up to 200 characters; use voice or instructions, never both
Voices
14 published voices; see Voices below
Output
MP3 by default; opus, aac, flac, wav or pcm (24 kHz 16-bit). Streaming: pcm or opus
Request size
64 KiB
Voice cloning
Cloning from your own recordings is not offered

Read the speech guide →

Voices

Pass one as voice, or describe a voice in instructions instead.

Published voices, by language
VoiceSounds like
Chinese
zh-female-calmcalm female preset
zh-male-warmwarm male preset
zh-sunwukongSun Wukong, licensed recording
English
en-female-clearclear female preset
English (US)
en-female-warm-uswarm, gentle female, designed voice
en-female-sweet-ussweet, playful female, designed voice
en-female-mature-usrich, mature female, designed voice
en-female-bedtime-ushushed, soft-spoken female, designed voice
English (US South)
en-female-southern-ussoft drawl female, designed voice
English (UK)
en-female-soft-ukcalm, soothing female, designed voice
English (UK, RP)
en-female-posh-ukcrisp, elegant female, designed voice
English (Irish)
en-female-lilt-ielilting, lively female, designed voice
English (Australian)
en-female-bright-aubright, cheerful female, designed voice
en-female-mellow-aulow, mellow female, designed voice

Disclosure

Speech from this model is AI-generated. Tell your listeners so, and keep the origin label in the audio files you pass on. If a shared voice answers 503, use one of the preset voices instead. Details are in the speech guide and the terms.

Pricing & usage

$1.00 / audio hour

We bill the audio we send you, by the 0.1 s. A request that completes is billed at least 1 second, held between two-thirds and twice what the text should take to say, so slow or silent output never costs more than double. A stream you stop is billed for the audio already sent, with no minimum. If our node drops the stream, or you disconnect while a whole file is being sent, the request is free; so are failed requests and empty audio. Voice instructions make no audio and cost nothing.

Default monthly cap
20 billed hours / month
Concurrent requests
8 per organization; 16 across external organizations

All keys share the organization’s UTC-month allowance. An administrator can change it. These are default caps, not your remaining quota or free credits.

Reference price checked 2026-11-18. Your customer agreement governs settlement.

All prices and how usage is counted →

Quota errors and retry guidance →

View the machine-readable contract

Published specification only. Inspect the discovery API for runtime observations; discovery does not reserve capacity.

{
  "id": "tokenflow-tts-1",
  "kind": "tts",
  "summary": "Generate speech from text using preset or described voices.",
  "tags": [
    "audio",
    "synthesis",
    "语音合成",
    "朗读"
  ],
  "protocols": [
    {
      "id": "speech",
      "method": "POST",
      "path": "/v1/audio/speech",
      "content_type": "application/json",
      "modes": [
        "mp3",
        "opus",
        "aac",
        "flac",
        "wav",
        "pcm",
        "stream_pcm",
        "stream_opus"
      ],
      "schema_scope": "complete_fields",
      "input_schema": {
        "type": "object",
        "properties": {
          "model": {
            "const": "tokenflow-tts-1"
          },
          "input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "voice": {
            "type": "string",
            "enum": [
              "zh-female-calm",
              "zh-male-warm",
              "en-female-clear",
              "zh-sunwukong",
              "en-female-warm-us",
              "en-female-sweet-us",
              "en-female-mature-us",
              "en-female-southern-us",
              "en-female-bedtime-us",
              "en-female-soft-uk",
              "en-female-posh-uk",
              "en-female-lilt-ie",
              "en-female-bright-au",
              "en-female-mellow-au"
            ]
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[^()()]+$"
          },
          "response_format": {
            "enum": [
              "mp3",
              "opus",
              "aac",
              "flac",
              "wav",
              "pcm"
            ],
            "default": "mp3"
          },
          "stream": {
            "type": "boolean"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "speed": {
            "type": "number",
            "minimum": 0.75,
            "maximum": 1.5,
            "default": 1
          }
        },
        "required": [
          "model",
          "input"
        ],
        "additionalProperties": false,
        "not": {
          "required": [
            "voice",
            "instructions"
          ]
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "stream": {
                  "const": true
                }
              },
              "required": [
                "stream"
              ]
            },
            "then": {
              "properties": {
                "response_format": {
                  "enum": [
                    "pcm",
                    "opus"
                  ]
                }
              }
            }
          }
        ]
      },
      "constraints": [
        "Input and instructions must contain non-whitespace text.",
        "Choose voice or instructions, never both. Instructions cannot contain parentheses.",
        "Formats as OpenAI names them: mp3 (default), opus, aac, flac, wav, pcm. pcm is 24 kHz 16-bit little-endian mono, streamed or not. Streaming takes pcm (default) or opus.",
        "Every audio response names its origin in the x-aigc-label header; mp3, aac, opus, flac and wav also carry it in the file. Keep it when you store or pass audio on.",
        "No cloning from your own recordings. Disclose AI speech and preserve origin metadata."
      ],
      "example": {
        "model": "tokenflow-tts-1",
        "input": "你好,欢迎使用语音服务。",
        "voice": "zh-female-calm"
      }
    }
  ],
  "guaranteed": {
    "max_input_characters": 4000,
    "max_instructions_characters": 200,
    "max_request_bytes": 65536,
    "voices": [
      "zh-female-calm",
      "zh-male-warm",
      "en-female-clear",
      "zh-sunwukong",
      "en-female-warm-us",
      "en-female-sweet-us",
      "en-female-mature-us",
      "en-female-southern-us",
      "en-female-bedtime-us",
      "en-female-soft-uk",
      "en-female-posh-uk",
      "en-female-lilt-ie",
      "en-female-bright-au",
      "en-female-mellow-au"
    ]
  },
  "documented": {
    "guide": "https://tokenflow.dev/speech",
    "limits": [
      "Text-based voice design; no cloning from your own audio."
    ]
  },
  "billing": {
    "meter": "tts_audio_ms",
    "minimum_billed_units": 1000,
    "measured": "delivered_audio_ms",
    "pricing": {
      "meter": "tts_audio_ms",
      "usd_per_hour": 1,
      "unit": "audio_hour",
      "status": "open",
      "currency": "USD",
      "checked_at": "2026-11-18",
      "settlement": "customer_agreement"
    }
  },
  "external_limits": {
    "concurrency": {
      "perTenant": 8,
      "external": 16,
      "retryAfterS": 5
    },
    "default_monthly": {
      "limit": 72000000,
      "unit": "tts_audio_ms"
    },
    "quota_is_not_free_credit": true
  },
  "schema_version": 1,
  "publication": "public",
  "next": [
    {
      "method": "POST",
      "path": "/v1/audio/speech",
      "content_type": "application/json",
      "body": {
        "model": "tokenflow-tts-1",
        "input": "你好,欢迎使用语音服务。",
        "voice": "zh-female-calm"
      }
    }
  ]
}

For developers and agents

Choose your way in

Human guides and machine-readable contracts describe the same APIs.

Need runtime observations? Use the public discovery API. Tenant access and quotas require your API key.

Published contract updated 27 November 2026. This page as Markdown · Terms · Data policy · All models