Generation

Generate speech

AI-generated speech, up to 1,000 characters (longer text is cut and the response says where). provider:auto/grok/openai; optional voiceId, language, speed, and OpenAI instructions for delivery. quoteOnly:true quotes without spending. Auto may fall back after a confirmed quota rejection within maxCredits; a named voice stays pinned. Creator and Studio.

post/ai/speech

Request

  • Base URL: https://api.vidmoat.com/v1
  • URL: https://api.vidmoat.com/v1/ai/speech
  • Auth: HTTP bearer

Request body

textstring required

What to say. Over 1,000 characters is cut, and truncated reports it.

provider'auto' | 'grok' | 'openai'

Who generates it. Auto picks the cheapest that can.

voiceIdstring

OpenAI: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse, marin (default), cedar. Grok: eve (default), ara, leo, rex, sal. A voice only one provider has pins that provider.

languagestring

auto or a language code.

speednumber

0.7 to 1.5.

instructionsstring

OpenAI only, up to 500 characters: how to deliver the line.

maxCreditsnumber

Never spend more than this. Routes above it are excluded.

quoteOnlyboolean

true returns the route and price without generating or charging.

Response

Generate speech

urlstring

The audio file. Use as a clip src.

routeobject

The provider route chosen: provider, model, credits, maxCredits, reason and policy (and voiceId for speech).

aiGeneratedboolean

Always true.

creditsobject

{ charged, remaining }: what this call cost and the balance after it.

truncatedobject

Present when the text was cut: { at, droppedChars, note }.

hintstring

What to do with it.

Changes

No recorded changes to this operation across all 1 revision of this API.