Text-to-Audio Generation API

Generate music and soundscapes from natural-language text prompts using FastRouter’s text-to-audio model routing.

Introduction

FastRouter.ai integrates the ace-step/prompt-to-audio model from the falai provider, enabling developers to turn prompts into fully rendered audio clips for creative, musical, or ambient use cases.


Endpoints

Audio Generation

POST https://go.fastrouter.ai/api/v1/chat/completions

Retrieve Generated Audio

POST https://go.fastrouter.ai/api/v1/getPromptToAudioResponse

Base URL

https://go.fastrouter.ai/api/v1

Parameters

Parameter
Type
Description

model

string

Must be "ace-step/prompt-to-audio"

prompt

string

Natural-language description of the audio or music to generate

duration

integer

(Optional) Duration of the audio clip in seconds (e.g. 5)


Request Format

Send a natural-language prompt to generate audio, optionally specifying a duration.

cURL Example


Python Example


Sample Response

FastRouter returns a job-queued response containing URLs to check status or fetch the final audio file:


Retrieving the Audio Output

Audio generation is asynchronous. Use the response_url returned above with this FastRouter endpoint to retrieve the final audio.

Polling for Audio Output (cURL)

When complete, the response includes a downloadable .wav or .mp3 audio link.


Billing & Usage

  • Credits used: See user_key_credits_used in the usage object

  • Costs: Based on clip duration + model pricing

  • No hidden charges: Transparent usage reporting in all responses

Last updated