Sonilo Text to Sound Effects API

Sonilo Text to Sound Effects generates a sound effect or ambience from a text description, from 1 second to 3 minutes long, as WAV, MP3, AAC or FLAC.

Provider

Sonilo

Billing

Per second

ScalingTensor price

$0.0018 per second of output

Playground

Try Sonilo Text to Sound Effects

Edit the params, add your API key and run the model here. The result plays on this page when the job completes.

Input

Used for this request only and never stored. Get a key

Running a request charges your wallet: $0.0018 per second of output.

Output

preview

Request summary

Endpoint
POST /api/media/generate
Model ID
sonilo/text-to-sfx
prompt
heavy rain on a tin roof with distant thunder
duration
10
audio_format
aac

Need chat models, job lookups or the raw response? Open the full playground.

Pricing

Sonilo Text to Sound Effects API pricing

Prices come from the live catalog. There is no subscription; each request is charged to your prepaid wallet.

ScalingTensor price

Per second

Live catalog price

$0.0018

per second of output

A 30-second output costs $0.054.

Compare all model prices

Shared balance

Add credits

Top up

One wallet and one API key for every model in the catalog. Top-ups start at $10 and are paid through Stripe.

Parameters

Input parameters

These parameters belong inside the request body's params object.

Input parameters
nametyperequireddescription
promptstringtrueText prompt describing the sound effect to generate. 1-2000 characters.
durationintegertrueDesired duration of the output audio. Min 1 sec, max 180 sec.
audio_formatstringfalseOutput audio format. One of wav, mp3, aac, flac. Defaults to aac.

Output fields

Output fields
nametypedescription
statusstringAlways processing on submission — generation runs asynchronously.

API

Call Sonilo Text to Sound Effects from your code

Create a key in the console and call the API from your server using the apiKey header. Save data.jobId and poll GET /api/media/result?jobId=... with the same key; a code of 0 means success.

POST /api/media/generate
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "sonilo/text-to-sfx",
  "params": {
    "prompt": "heavy rain on a tin roof with distant thunder",
    "duration": 10,
    "audio_format": "aac"
  }
}'
const response = await fetch("https://restapi.scalingtensor.com/api/media/generate", {
  method: "POST",
  headers: {
    apiKey: process.env.SCALINGTENSOR_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "sonilo/text-to-sfx",
    "params": {
      "prompt": "heavy rain on a tin roof with distant thunder",
      "duration": 10,
      "audio_format": "aac"
    }
  }),
});

const result = await response.json();
if (!response.ok || result.code !== 0) {
  throw new Error(result.msg || `Request failed: ${response.status}`);
}
console.log(result.data); // Save data.jobId to query /api/media/result
import os
import requests

payload = {
    "model": "sonilo/text-to-sfx",
    "params": {
        "prompt": "heavy rain on a tin roof with distant thunder",
        "duration": 10,
        "audio_format": "aac",
    },
}

response = requests.post(
    "https://restapi.scalingtensor.com/api/media/generate",
    headers={"apiKey": os.environ["SCALINGTENSOR_API_KEY"]},
    json=payload,
    timeout=60,
)
result = response.json()
if result["code"] != 0:
    raise RuntimeError(result["msg"])
print(result["data"])  # Save data["jobId"] to query /api/media/result

API documentation · This page as Markdown · Markdown API reference

Related models

Sonilo Text to Sound Effects API FAQ

How much does the Sonilo Text to Sound Effects API cost?

Sonilo Text to Sound Effects costs $0.0018 per second of output on ScalingTensor. A 30-second output costs $0.054. There is no subscription; usage is charged to your prepaid wallet.

How do I call the Sonilo Text to Sound Effects API?

Send POST /api/media/generate with "model": "sonilo/text-to-sfx" and the parameters in a params object, using your apiKey header. The call returns a jobId. Poll GET /api/media/result?jobId=... until the status is completed, then read the output URL from the result.

Which parameters does Sonilo Text to Sound Effects accept?

Required: prompt and duration. Optional: audio_format. The parameter table on this page describes each one.

Do I need a Sonilo account to use Sonilo Text to Sound Effects?

No. You call Sonilo Text to Sound Effects with your ScalingTensor API key and pay from your ScalingTensor wallet. The same key works for every other model in the catalog.