
AI agents are getting better at interacting with the real world by browsing the web, writing code, and managing files. But most agents are still silent. What if your AI agent could find and use sound effects?
The Lotsofsounds API is built for exactly this. The search endpoint takes short keyword queries plus tag and duration filters, which makes it easy to use from LLM tool calling.
Why sound effects for AI agents?
- App builders: Agents that build apps can add audio feedback automatically
- Game designers: AI-assisted game development with contextual sound selection
- Accessibility: Agents that enhance interfaces with audio cues
- Content creation: Automated video/podcast production with sound design
- Prototyping: Rapidly prototype audio experiences without manual asset hunting
Setting up as an LLM tool
Here's how to define the Lotsofsounds API as a tool for an LLM agent.
Tool definition (OpenAI function calling format)
{
"name": "search_sounds",
"description": "Search for royalty-free sound effects and music tracks. Returns matching sounds with metadata like duration, tags, and ratings.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "One or two keywords that describe the sound (e.g. 'chime', 'thunder')"
},
"tags": {
"type": "string",
"description": "Comma-separated tags to filter by (e.g. 'nature,weather')"
},
"max_duration": {
"type": "number",
"description": "Maximum duration in seconds"
}
},
"required": ["query"]
}
}Tool implementation
async function searchSounds({ query, tags, max_duration }) {
const params = new URLSearchParams({ q: query, limit: "5" });
if (tags) params.set("tags", tags);
if (max_duration) params.set("max_duration", String(max_duration));
const res = await fetch(
`https://api.lotsofsounds.com/api/v1/sounds?${params}`,
{ headers: { "x-api-key": process.env.LOS_API_KEY } }
);
return res.json();
}
async function downloadSound({ sound_id }) {
const res = await fetch(
`https://api.lotsofsounds.com/api/v1/sounds/${sound_id}/download`,
{ headers: { "x-api-key": process.env.LOS_API_KEY } }
);
return res.json();
}import requests
import os
def search_sounds(query, tags=None, max_duration=None):
params = {"q": query, "limit": 5}
if tags:
params["tags"] = tags
if max_duration:
params["max_duration"] = max_duration
res = requests.get(
"https://api.lotsofsounds.com/api/v1/sounds",
params=params,
headers={"x-api-key": os.environ["LOS_API_KEY"]},
)
return res.json()
def download_sound(sound_id):
res = requests.get(
f"https://api.lotsofsounds.com/api/v1/sounds/{sound_id}/download",
headers={"x-api-key": os.environ["LOS_API_KEY"]},
)
return res.json()Example agent prompt
You are a helpful assistant that can find and download sound effects.
When the user asks for a sound, use the search_sounds tool to find
matching sounds, then present the results. If they want to download
one, use the download_sound tool.Example conversation
User: I need a short notification sound for my app, something gentle and not too long.
Agent (calls search_sounds):
{ "query": "chime", "max_duration": 3 }Agent: I found 5 notification sounds. Here are the top results:
- "Notification Ding" (0.8s) - rated 4.7
- "Soft Chime Alert" (1.2s) - rated 4.5
- "Bell Notification" (1.5s) - rated 4.3
Would you like me to download one of these?
MCP server integration
Model Context Protocol
If you're building with MCP, you can wrap the Lotsofsounds API as an MCP tool server. The search and download endpoints map directly to MCP tool calls.
Rate limits for agent workflows
Keep daily request limits in mind when running agents in loops. Enterprise gives you 50,000 requests/day, which is suitable for production agent workflows. Downloads are unlimited on all paid plans.
| Plan | Requests/day | Downloads |
|---|---|---|
| Pro | 2,500 | Unlimited |
| Enterprise | 50,000 | Unlimited |
Monitor usage via X-RateLimit-Remaining response headers.
Get started
Sign up and subscribe to a plan
Generate an API key from your dashboard
Add the tool definitions to your agent framework
Start searching for sounds by keyword
Check out the full API reference for all available endpoints and parameters.