Sonilo V1.1 Text-to-Sound-Effects API Audio by SONILO – Harga Kompetitif – Akses API Terpadu
# sonilo/v1.1/text-to-sound-effects
> Sonilo V1.1 generates commercial-use-safe sound effects from a text prompt, with control over type, texture and intensity, from half-second hits to 3-minute ambiences, in WAV, MP3, AAC or FLAC.
## Overview
- **Submit endpoint (POST)**: `https://api.atlascloud.ai/api/v1/model/generateAudio` — start an async generation; returns a `prediction_id`
- **Poll endpoint (GET)**: `https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}` — poll this until the prediction finishes
- **Model ID**: `sonilo/v1.1/text-to-sound-effects`
## API Information
This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.
### Input Schema
The API accepts the following input parameters:
- **`model`** (`string`, _required_):
Model name.
- Default: `"sonilo/v1.1/text-to-sound-effects"`
- **`prompt`** (`string`, _required_):
Describe the sound: what it is, its texture and intensity, e.g. "heavy wooden door slamming in a stone hallway".
- **`duration`** (`number`, _optional_):
Length of the sound in seconds, 0.5–180.
- Default: `8`
- Min: 0.5
- Max: 180
- **`output_format`** (`string`, _optional_):
Output audio format.
- Default: `"aac"`
- Options: "aac", "mp3", "wav", "flac"
**Required Parameters Example**:
```json
{
"model": "sonilo/v1.1/text-to-sound-effects",
"prompt": ""
}
```
**Full Example**:
```json
{
"model": "sonilo/v1.1/text-to-sound-effects",
"prompt": "",
"duration": 8,
"output_format": "aac"
}
```
### Output Schema
The API returns the following output format:
- **`id`** (`string`, _optional_):
Unique identifier for the prediction.
- **`model`** (`string`, _optional_):
Model ID used for the prediction.
- **`status`** (`string`, _optional_):
Status of the task: created, processing, completed, or failed.
- **`outputs`** (`array[string]`, _optional_):
Array with the URL of the generated sound effect.
- **`created_at`** (`string`, _optional_):
ISO timestamp of when the request was created.
- **`urls`** (`object`, _optional_):
Object containing related API endpoints.
**Example Response**:
```json
{
"id": "",
"model": "",
"status": "",
"outputs": [
""
],
"created_at": "",
"urls": {}
}
```
## Usage Examples
### cURL
```bash
# Step 1: Start generation (async)
curl -X POST "https://api.atlascloud.ai/api/v1/model/generateAudio" \
-H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sonilo/v1.1/text-to-sound-effects",
"prompt": "",
"duration": 8,
"output_format": "aac"
}'
# Response will contain: {"code": 200, "data": {"id": "prediction_id", "status": "processing"}}
# Step 2: Poll for result (replace {prediction_id} with the id returned above)
curl -X GET "https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}" \
-H "Authorization: Bearer $ATLASCLOUD_API_KEY"
# Keep polling until status is "completed", "succeeded" or "failed"
# When completed, outputs will contain the generated content URL(s)
```
## Additional Resources
### Documentation
- [Model Playground](https://www.atlascloud.ai/models/sonilo/v1.1/text-to-sound-effects)
Read more here: Source link
