Generate > Text to Speech
Text to Speech
Create speech audio from text and a reusable voice asset.
Examples
curl -X POST https://medux-server-api-dev.lingverse.co/api/app/v1/generate/audio \
-H 'Authorization: Bearer $MEDUX_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"links":["https://example.com/reference"],"model":"MODEL","model_id":"MODEL_ID","text":"Hello from Medux","title":"Demo title","voice_asset_id":"VOICE_ASSET_ID"}'Media Samples
Approved examples for understanding request inputs, response shape, and official example output.
Official text-to-speech audio
This example uses speech-standard.
Sample request
Generate speech audio from text with an official public voice.
Sample response
Official example output for preview only. It is not a user Media Result.
Example output
Auth Requirements
Authentication is required via Authorization header.
Preconditions
Requires a voice_asset_id.
Requires voice_asset_id from your Media Assets or official public assets, plus non-empty text.
Also accepts optional links and model.
Request
Body
application/jsonAuthorizationstringrequiredBearer token or API key.
Location: HEADER
linksarray<string>optionalOptional reference links collected from the Playground form.
Location: BODY
modelstringoptionalSelected generation model label or version from the Playground form.
Location: BODY
model_idstringoptionalStable public Medux model identifier.
Location: BODY
textstringoptionalNo description provided.
Location: BODY
titlestringoptionalNo description provided.
Location: BODY
voice_asset_idstringrequiredReusable voice asset ID owned by the current user or listed as an official public asset.
Location: BODY
Response
Response
application/jsoncodeint32optionalresponse code enums:
.. 0: ok
.. 12: invalid input
.. 1410: invalid model
.. 1409: paid plan required
.. 1401: insufficient credits
.... 1401 ~ 1499 是 media
.. 1402: asset category mismatch
.. 1403: voice asset required
.. 1407: asset locked
.. 1408: asset expired
.. 1404: provider error
.. 1405: provider timeout
.. 13: unauthenticated
.. 16: rate limit
.. 99: server error
Available options: 0 12 1410 1409 1401 1402 1403 1407 1408 1404 1405 13 16 99
Location: RESPONSE
data.assetobjectoptionalNo description provided.
Location: RESPONSE
data.paid_plan_requiredobjectoptionalNo description provided.
Location: RESPONSE
data.taskobjectoptionalNo description provided.
Location: RESPONSE
messagestringoptionalNo description provided.
Available options: ok invalid input invalid model paid plan required insufficient credits asset category mismatch voice asset required asset locked asset expired provider error provider timeout unauthenticated rate limit server error
Location: RESPONSE
MCP Tool
This endpoint is also available through the Medux-hosted remote MCP service.
Speech / Text-to-Speech Audio
Create speech audio from text and an optional reusable voice asset.
Invocation Example
Generate speech audio from this text using voice_asset_id {voice_asset_id} and model_id speech-standard.
On this page