Get Text to Sound Run Result
Retrieve the generated audio file for a completed Text to Sound task.
This endpoint retrieves the audio output generated from a previously completed Text to Sound task. It provides access to the audio content that was created based on the text prompt and configuration specified in your original request based on returned run_id
.
The endpoint supports two different response formats based on your needs:
Audio Stream (Default)
Returns the raw audio bytes of your generated sound effect in WAV format. This is ideal for:
- Direct playback in browser applications
- Immediately saving the audio to your local system
- Streaming the audio to users in real-time applications
Download URL
Content-Type: application/json
Returns a JSON object containing a URL where the generated audio file can be downloaded:
This option is useful when you prefer to:
- Defer the actual download to a later time
- Share the audio file with others via a link
- Implement custom download behavior in your application
Example Usage
Retrieving Audio as a Stream
Retrieving a Download URL
Response:
Best Practices
To get the most from this endpoint:
- Check Task Status First: Only request results for tasks that have completed successfully.
- Handle Audio Appropriately: The returned WAV format is widely compatible but may need conversion for specific use cases.
- Download Promptly: Temporary URLs may expire after a certain period, so download and store important files.
Technical Considerations
- The generated audio files are delivered in WAV format which provides high quality but larger file sizes.
- If the specified
run_id
doesn’t exist or hasn’t completed processing, you’ll receive an appropriate error response.
By integrating this endpoint with your audio production workflow, you can seamlessly access AI-generated sound effects created from text descriptions, enabling new creative possibilities for your projects.
Authorizations
The x-api-key
is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.
Path Parameters
The unique identifier for the run, which was generated during the text to an audio effect creation process and returned upon task completion.
Response
Successful Response
The generated audio file bytes in WAV format, representing the audio effect created from the provided text prompt.