Rate limits and retries
How to retry failed requests and stay within your rate limits. Everything here applies to every endpoint, except the per-user limits, which apply only to some /v0/ integrations. For error formats and status codes, see Error handling.
Transient errors (HTTP 502, 503, 504)
These are transient errors. They come from network components between your servers and ours, such as load balancers and proxies, or from a service behind the API that failed, was unavailable or did not answer in time. They are expected to occur occasionally and do not indicate a problem with your integration.
Implement an exponential backoff retry strategy so these do not surface as errors to your end users:
| Attempt | Wait time |
|---|---|
| 1st retry | 5ms |
| 2nd retry | 10ms |
| 3rd retry | 20ms |
| 4th retry | 40ms |
| 5th retry | 80ms |
If the response carries a Retry-After header, respect it instead of the schedule above. This applies to every retryable error, not just 429.
If errors persist beyond 5 retries, log the incident and surface a user-friendly message.
Firewall protection
To ensure the stability of the API, we use web application firewall solutions that protect against malicious attacks. In many cases, this allows us to mitigate attacks without affecting users. However, it is sometimes hard to distinguish between an attack and an unintentional request overload from well-intended clients, sometimes referred to as friendly fire.
You can decrease the risk that your client gets mistaken for a malicious actor by implementing delays for any request retries, for example, by using the exponential backoff strategy described above.
Blocked audio downloads (HTTP 406)
When the firewall blocks a request for an audio file on pdn.epidemicsound.com, it returns 406 Not Acceptable. Despite the status name, this is not a content negotiation problem — changing the Accept header will not help.
We do our best to ensure this does not affect requests from legitimate clients, but unfortunately, this can not always be avoided, and therefore we advise you to handle this in your clients.
A 406 most often means automated downloads from a small number of IP addresses have been mistaken for scraping. What triggers it is the sustained, machine-regular pattern rather than any particular request — steady sequential downloads from one IP can reach it at surprisingly modest rates.
Retry after a delay of at least 2 seconds, increasing the delay on each attempt and giving up after a few — an immediate retry from the same IP makes things worse. If a Retry-After header is present in the response, respect that timing instead. Spreading download traffic out over time is the real fix, since the block follows the sustained pattern rather than any single request.
Don't retry indefinitely. A short pause clears a transient block, but once an IP is blocked outright no amount of retrying will get through. If 406s survive your retries, stop and contact us with your egress IP addresses and a time window, and we will adjust the firewall rules for your integration.
Rate limits
Rate limits apply per app and are shared by all its API keys and end users. The /v0 and /v1 endpoints count towards the same limits. There are two:
- Daily limit: every authenticated request counts, whatever the endpoint: search, preview, download, sound effects and reporting alike. It resets at midnight UTC.
- Burst limit: a per-second limit of about five times the average rate of your daily limit, which stops sudden spikes.
The default daily limit depends on your plan:
| Plan | Requests per day |
|---|---|
| Free | 1,500 |
| Scale | 250,000 |
On Enterprise, limits are set to fit your expected volume. Tell your Epidemic Sound contact how many requests you expect per day and at peak per second.
The daily limit counts requests, not credits. A download counts once toward the daily limit and is also charged in credits.
Every response reports both limits and what is left of them:
RateLimit-Policy: "burst";q=521;w=1, "daily";q=9000000;w=86400
RateLimit: "burst";r=520;t=1, "daily";r=8999971;t=52183
q is the quota, w the window in seconds, r the requests remaining in the window, and t the seconds until it resets. A request over either limit returns 429 with a Retry-After header giving the seconds to wait. For the full definition, see Rate limiting in the API reference.
To stay within your limits:
- Read the
RateLimitheader instead of waiting for a429. - Set up alerts when you reach 80–90% of your daily limit.
- Batch where an endpoint allows it, such as several tracks in one usage report.
- Cache responses that don't change often, such as genre and mood lists.
- Spread bulk jobs, such as catalogue syncs, over the day instead of running them in one burst.
If you keep hitting the limits, contact us and include which endpoint you're calling and the error you're seeing.
Per-user limits (User Token and Connect)
This limit applies to integrations where each end user has their own token: the deprecated Partner Token Authentication, with a User Token per user, and Connect. New integrations should use API Key Authentication, which this limit doesn't apply to.
These integrations are limited to 350 requests per week per user, per app, but this counts only the audio-delivery endpoints, not general browsing:
GET /v0/tracks/{id}/downloadGET /v0/tracks/{id}/streamandGET /v0/tracks/{id}/hlsGET /v0/sound-effects/{id}/preview
Downloads, track previews and sound effect previews each have a separate 350-per-week counter, so exhausting one does not block the others. Browsing sound effects doesn't use up a user's music previews.
Search, browse, metadata, moods, genres, collections, other sound effect endpoints and usage reporting do not count. Only successful responses increment the counter.
Responses from these endpoints carry the user's count:
x-user-ratelimit-count: Current request count for the userx-user-ratelimit-limit: Maximum allowed requests (350)
A user over the limit gets 429 with X-User-Rate-Limit-Reset, the seconds until their counter resets.
API key requests are attributed to your app rather than to an end user, so with an API key only the daily and burst rate limits apply.