Mmaudio V2 Text To Audio

Usage-based pricing
ae_mmaudio_v2_text_to_audio

Create sound effects, ambience, or other audio clips from a text prompt, up to 30 seconds long.

Audio
Usage-based pricing

Pricing

The charge per call is (max(1.2 × generated audio duration (seconds), 0)) AE credits. All applicable conditions are combined to calculate the total.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.seedinteger | unknownNoThe seed for the random number generator—
request_body.promptstringYesThe prompt to generate the audio for.—
request_body.durationnumberNoThe duration of the audio to generate.8
request_body.num_stepsintegerNoThe number of steps to generate the audio for.25
request_body.cfg_strengthnumberNoThe strength of Classifier Free Guidance.4.5
request_body.mask_away_clipbooleanNoWhether to mask away the clip.false
request_body.negative_promptstringNoThe negative prompt to generate the audio for.""

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit first, then query with the returned task_id until the task completes.

Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_mmaudio_v2_text_to_audio' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "duration": 3,
      "negative_prompt": "music, melody, vocals, speech, explosion, battle, thunder, clipping, harsh piercing whistle, racing car",
      "num_steps": 35,
      "prompt": "A single cinematic spaceship fly-away whoosh, three seconds. Warm controlled propulsion and smooth air-like sci-fi energy sweep, starts present then recedes into the distance with a gentle reverb tail. A hopeful departure sound, restrained and polished with textured midrange. Ends completely, no sustained loop, no music, no speech."
    }
  }
}'
Response exampleresponse.json
JSON
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "30ba0637-45f2-4e78-b98e-5533e8d069d0"
}

Guides using this tool

See how this tool fits into real workflows