# Sonilo Video to Sound Effects API

> Sonilo Video to Sound Effects adds sound effects that match what happens on screen. The model infers sounds from the footage, and optional prompts or timed segments direct specific effects.

- Model ID: `sonilo/video-to-sfx`
- Provider: Sonilo
- Tasks: Sound Effects, Video to Sound Effects
- Price: $0.009 per second of source video. A 60-second video costs $0.54.
- Web page: https://scalingtensor.com/models/sonilo/video-to-sfx

## How to call it

Authenticate with the `apiKey` request header. Submit a job, then poll for the result:

1. `POST https://restapi.scalingtensor.com/api/media/generate` with JSON `{ "model": "<model ID>", "params": { ... } }`. The response `data.jobId` identifies the job.
2. `GET https://restapi.scalingtensor.com/api/media/result?jobId=<jobId>` until the status is `completed` or `failed`.
3. A response `code` of 0 means success; otherwise read `msg`.

```bash
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "sonilo/video-to-sfx",
  "params": {
    "prompt": "Generate realistic ambient sound effects synchronized with the visuals.",
    "video_url": "https://example.com/your-video.mp4",
    "audio_format": "aac"
  }
}'
```

## Input parameters

Parameters go inside the `params` object.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `video_url` | string | conditional | URL to a video file. Provide either video or video_url, not both. Must be a public http:// or https:// URL; private/internal addresses are rejected. Max file size: default 300MB. Max duration: 480 sec. |
| `prompt` | string | false | Optional text prompt describing the sound effects to generate, up to 2000 characters. For best results, omit this and let the model infer sound effects from the on‑screen action, or use segments for finer control. |
| `segments` | string | false | Optional JSON array of timed sound‑effect prompts, up to 30 items. Each item has start and end (seconds; the first segment's start must be 0, each segment's end must be greater than its start, and segments must be contiguous — each end equal to the next segment's start) and prompt (1‑200 characters) describing the sound effect for that segment. The last segment's end must not exceed the video duration, which is capped at 480 sec. |
| `audio_format` | string | false | Output audio format. One of wav, mp3, aac, flac. Defaults to aac. |

## FAQ

### How much does the Sonilo Video to Sound Effects API cost?

Sonilo Video to Sound Effects costs $0.009 per second of source video on ScalingTensor. A 60-second video costs $0.54. There is no subscription; usage is charged to your prepaid wallet.

### How do I call the Sonilo Video to Sound Effects API?

Send POST /api/media/generate with "model": "sonilo/video-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 Video to Sound Effects accept?

No parameter is strictly required. Optional: video_url, prompt, segments and audio_format. The parameter table on this page describes each one.

### Do I need a Sonilo account to use Sonilo Video to Sound Effects?

No. You call Sonilo Video 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.
