REST API
Rate Limits
API rate limits for the Cleanvoice REST API.
Cleanvoice enforces per-API-key rate limits to ensure fair usage across all users.
Limits
| Endpoint | Standard | Enterprise |
|---|---|---|
POST /v2/edits, POST /v2/upload | 30 / min | 100 / min |
GET /v2/edits/{id} (polling) | 300 / min | 300 / min |
Rate limit response
When you exceed the limit, the API returns:
HTTP 429 Too Many Requests
{ "detail": "Rate limit exceeded. Please slow down." }Handling 429s
Implement exponential backoff when polling: wait 1s, then 2s, then 4s before retrying.
import time
def poll_with_backoff(client, edit_id, max_attempts=60):
delay = 2
for _ in range(max_attempts):
result = client.get_edit(edit_id)
if result["status"] == "SUCCESS":
return result
if result["status"] == "FAILURE":
raise Exception("Edit failed")
time.sleep(delay)
delay = min(delay * 1.5, 30) # cap at 30s
raise TimeoutError("Edit did not complete in time")Need a higher limit? Contact sales@cleanvoice.ai.