Skip to main content

Rate Limits and Error Codes

This document outlines the rate limits for Kid Smart AI APIs and provides information on potential error responses you may encounter.

Rate Limits

Kid Smart AI implements the following rate limits to ensure fair usage and system stability:

  • Request rate: 10 requests per second
  • Burst: 10 requests
  • Monthly quota: 10000 requests per month

If you need higher limits, please contact us at it@kidsmart.ai to discuss your requirements.

Exceeding Rate Limits

If you exceed these limits, you will receive an HTTP 429 Too Many Requests status code. We recommend implementing exponential backoff in your applications to handle rate limiting gracefully.

Error Codes

Below are the possible error responses you may encounter when using Kid Smart AI APIs:

Status CodeError TypeDescription
400Bad RequestThe request was invalid or cannot be served. The exact error should be explained in the error payload.
401UnauthorizedThe request requires authentication.
403ForbiddenThe server understood the request but refuses to authorize it.
404Not FoundThe requested resource could not be found.
413Payload Too LargeThe request is larger than the server is willing or able to process.
415Unsupported Media TypeThe media format of the requested data is not supported by the server.
429Too Many RequestsThe user has sent too many requests in a given amount of time.
500Internal Server ErrorThe server encountered an unexpected condition that prevented it from fulfilling the request.
504Gateway TimeoutThe server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

Detailed Error Responses

In addition to standard HTTP status codes, our API may return more specific error types:

Error TypeStatus CodeDescription
Access Denied403The request was denied due to insufficient permissions.
API Configuration Error500There is an issue with the API configuration. Please contact support.
Authorizer Failure500The request could not be authorized. Check your authentication credentials.
Expired Token403The authentication token has expired. Please refresh your token.
Invalid API Key403The provided API key is not valid. Check your API key in the dashboard.
Invalid Signature403The request signature is invalid. Ensure you're signing requests correctly.
Missing Authentication Token403The request is missing an authentication token.
Quota Exceeded429You have exceeded your monthly request quota.
WAF Filtered403The request was blocked by our Web Application Firewall.

Handling Errors

When an error occurs, the response body will contain more information about the error. Here's an example error response:

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded",
"details": "Request rate of 10 per second exceeded"
}
}```


We recommend implementing proper error handling in your applications to gracefully manage these scenarios.

## Best Practices

1. Implement exponential backoff for rate limit errors (429 status code).
2. Use a unique `user_token` for each user to ensure we can employ industry leading data privacy and protection.
3. Monitor your API usage through our [dashboard](https://dashboard.kidsmart.ai) to avoid hitting limits unexpectedly.

For any questions about error handling or to report unexpected errors, please contact our support team at it@kidsmart.ai.