Skip to navigation

API: the 2,000-character limit on `/v1/audio/speech` counts spoken text, not SSML tags

POST /v1/audio/speech now accepts up to 2,000 characters of spoken text, the characters a request is billed for. SSML tags no longer count toward the limit.

  • The number is unchanged; only what it counts is. Tags such as <speak>, <break> and <prosody> are not counted, an entity such as &amp; counts as one character, and a <sub> counts its alias.
  • The input as sent can be up to 20,000 characters, markup included.
  • A refusal says which limit it hit. It is still 400 validation_failed, and the message names either the spoken-text limit or the 20,000-character ceiling.
  • Nothing that was accepted before is refused. Plain text is counted exactly as before.

/v1/audio/stream and /v1/audio/stream/with-timestamps are unchanged: 20,000 characters, SSML tags included.

No API version change is needed. See API Limits.