How API requests are throttled
Meya API rate limits depend on which resource you are accessing.
You can check the returned HTTP headers of any API request to see your current rate limit status:
curl -i https://api.meya.ai
HTTP/1.1 200 OK
Date: Mon, 13 Feb 2017 18:15:57 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 46
X-RateLimit-Reset: 17
The headers tell you everything you need to know about your current rate limit status:
Header Name | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests that the consumer is permitted to make per hour. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The amount of time (in seconds) when the rate limit window will reset |
Once you go over the rate limit you will receive an error response:
curl -i https://api.meya.ai
HTTP/1.1 429 TOO MANY REQUESTS
Date: Mon, 13 Feb 2017 18:25:55 GMT
Retry-After: 20
{"detail":"Request was throttled. Expected available in 20.0 seconds."}
Rate limits by resource
Resource | Free | Paid |
---|---|---|
Default | 60 / minute | 10,000 / minute |
/broadcast | n/a | 1,000 / minute |
/users{/user_id} | 10 / minute | 1,000 / minute |
/db/{table}{/object_id} | 10 / minute | 1,000 / minute |