[{"data":1,"prerenderedAt":300},["ShallowReactive",2],{"doc-article-getting-started-rate-limits":3,"doc-siblings-getting-started":292},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"code_curl":16,"code_node":17,"code_python":18,"code_go":19,"body":20,"_type":286,"_id":287,"_source":288,"_file":289,"_stem":290,"_extension":291},"\u002Fdeveloper\u002Fgetting-started\u002Frate-limits","getting-started",false,"","Rate Limits","Understand rate limits, concurrency parameters, and rate limits headers response structures.",3,"intermediate","3 minutes",[14,15],"\u002Fdocs\u002Fgetting-started\u002Fintroduction","\u002Fdocs\u002Fgetting-started\u002Fauthentication","# Check rate limits headers by running a standard HEAD call\ncurl -I -X GET \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fstatus\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n","\u002F\u002F Inspect HTTP rate limits response headers in Node.js\nconst axios = require('axios');\n\naxios.get('https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fstatus', {\n  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }\n})\n.then(res => {\n  console.log('Limit:', res.headers['x-ratelimit-limit']);\n  console.log('Remaining:', res.headers['x-ratelimit-remaining']);\n})\n.catch(err => console.error('Limit Error:', err.message));\n","# Inspect headers in Python\nimport requests\n\nres = requests.get(\"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fstatus\", headers={\"Authorization\": \"Bearer YOUR_API_KEY\"})\nprint(\"Limit:\", res.headers.get(\"X-RateLimit-Limit\"))\nprint(\"Remaining:\", res.headers.get(\"X-RateLimit-Remaining\"))\n","\u002F\u002F Inspect headers in Go\npackage main\n\nimport (\n    \"fmt\"\n    \"net\u002Fhttp\"\n)\n\nfunc main() {\n    req, _ := http.NewRequest(\"GET\", \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fstatus\", nil)\n    req.Header.Set(\"Authorization\", \"Bearer YOUR_API_KEY\")\n    \n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    \n    fmt.Println(\"Limit:\", resp.Header.Get(\"X-RateLimit-Limit\"))\n    fmt.Println(\"Remaining:\", resp.Header.Get(\"X-RateLimit-Remaining\"))\n}\n",{"type":21,"children":22,"toc":279},"root",[23,32,38,45,58,121,127,132,212,225,238,250],{"type":24,"tag":25,"props":26,"children":28},"element","h1",{"id":27},"api-rate-limits-throttling",[29],{"type":30,"value":31},"text","API Rate Limits & Throttling",{"type":24,"tag":33,"props":34,"children":35},"p",{},[36],{"type":30,"value":37},"To safeguard the performance and integrity of our messaging engines, the AISoule REST API implements strict rate limits.",{"type":24,"tag":39,"props":40,"children":42},"h2",{"id":41},"default-limits",[43],{"type":30,"value":44},"Default Limits",{"type":24,"tag":33,"props":46,"children":47},{},[48,50,56],{"type":30,"value":49},"Rate limits are calculated on a ",{"type":24,"tag":51,"props":52,"children":53},"strong",{},[54],{"type":30,"value":55},"per-API key",{"type":30,"value":57}," basis, refreshed in rolling windows:",{"type":24,"tag":59,"props":60,"children":61},"ul",{},[62,80,105],{"type":24,"tag":63,"props":64,"children":65},"li",{},[66,71,73,78],{"type":24,"tag":51,"props":67,"children":68},{},[69],{"type":30,"value":70},"Standard REST API routes",{"type":30,"value":72},": ",{"type":24,"tag":51,"props":74,"children":75},{},[76],{"type":30,"value":77},"120 requests per minute",{"type":30,"value":79}," (2 requests\u002Fsec).",{"type":24,"tag":63,"props":81,"children":82},{},[83,97,98,103],{"type":24,"tag":51,"props":84,"children":85},{},[86,88,95],{"type":30,"value":87},"Messaging endpoints (",{"type":24,"tag":89,"props":90,"children":92},"code",{"className":91},[],[93],{"type":30,"value":94},"\u002Fv1\u002Fmessages",{"type":30,"value":96},")",{"type":30,"value":72},{"type":24,"tag":51,"props":99,"children":100},{},[101],{"type":30,"value":102},"300 requests per minute",{"type":30,"value":104}," (5 requests\u002Fsec burst).",{"type":24,"tag":63,"props":106,"children":107},{},[108,113,114,119],{"type":24,"tag":51,"props":109,"children":110},{},[111],{"type":30,"value":112},"Media uploads",{"type":30,"value":72},{"type":24,"tag":51,"props":115,"children":116},{},[117],{"type":30,"value":118},"30 requests per minute",{"type":30,"value":120},".",{"type":24,"tag":39,"props":122,"children":124},{"id":123},"checking-your-rate-limit-status",[125],{"type":30,"value":126},"Checking Your Rate Limit Status",{"type":24,"tag":33,"props":128,"children":129},{},[130],{"type":30,"value":131},"Every API response returns standard rate-tracking HTTP headers to help you monitor consumption dynamically:",{"type":24,"tag":133,"props":134,"children":135},"table",{},[136,156],{"type":24,"tag":137,"props":138,"children":139},"thead",{},[140],{"type":24,"tag":141,"props":142,"children":143},"tr",{},[144,151],{"type":24,"tag":145,"props":146,"children":148},"th",{"align":147},"left",[149],{"type":30,"value":150},"Header",{"type":24,"tag":145,"props":152,"children":153},{"align":147},[154],{"type":30,"value":155},"Description",{"type":24,"tag":157,"props":158,"children":159},"tbody",{},[160,178,195],{"type":24,"tag":141,"props":161,"children":162},{},[163,173],{"type":24,"tag":164,"props":165,"children":166},"td",{"align":147},[167],{"type":24,"tag":89,"props":168,"children":170},{"className":169},[],[171],{"type":30,"value":172},"X-RateLimit-Limit",{"type":24,"tag":164,"props":174,"children":175},{"align":147},[176],{"type":30,"value":177},"The maximum number of requests allowed in the rolling window.",{"type":24,"tag":141,"props":179,"children":180},{},[181,190],{"type":24,"tag":164,"props":182,"children":183},{"align":147},[184],{"type":24,"tag":89,"props":185,"children":187},{"className":186},[],[188],{"type":30,"value":189},"X-RateLimit-Remaining",{"type":24,"tag":164,"props":191,"children":192},{"align":147},[193],{"type":30,"value":194},"The number of requests remaining in the active window.",{"type":24,"tag":141,"props":196,"children":197},{},[198,207],{"type":24,"tag":164,"props":199,"children":200},{"align":147},[201],{"type":24,"tag":89,"props":202,"children":204},{"className":203},[],[205],{"type":30,"value":206},"X-RateLimit-Reset",{"type":24,"tag":164,"props":208,"children":209},{"align":147},[210],{"type":30,"value":211},"The Unix epoch timestamp (in seconds) indicating when the rolling window resets.",{"type":24,"tag":39,"props":213,"children":215},{"id":214},"handling-rate-limit-exceeded-errors-429",[216,218,224],{"type":30,"value":217},"Handling Rate Limit Exceeded Errors (",{"type":24,"tag":89,"props":219,"children":221},{"className":220},[],[222],{"type":30,"value":223},"429",{"type":30,"value":96},{"type":24,"tag":33,"props":226,"children":227},{},[228,230,236],{"type":30,"value":229},"When limits are exceeded, requests return an HTTP ",{"type":24,"tag":89,"props":231,"children":233},{"className":232},[],[234],{"type":30,"value":235},"429 Too Many Requests",{"type":30,"value":237}," error. The response body is structured as follows:",{"type":24,"tag":239,"props":240,"children":245},"pre",{"className":241,"code":243,"language":244,"meta":7},[242],"language-json","{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"rate_limit_exceeded\",\n    \"message\": \"Too many requests. Please wait before retrying.\",\n    \"retry_after_seconds\": 15\n  }\n}\n","json",[246],{"type":24,"tag":89,"props":247,"children":248},{"__ignoreMap":7},[249],{"type":30,"value":243},{"type":24,"tag":251,"props":252,"children":253},"blockquote",{},[254],{"type":24,"tag":33,"props":255,"children":256},{},[257,263,265,270,272,277],{"type":24,"tag":258,"props":259,"children":260},"span",{},[261],{"type":30,"value":262},"!TIP",{"type":30,"value":264},"\nAlways implement a retry logic with an ",{"type":24,"tag":51,"props":266,"children":267},{},[268],{"type":30,"value":269},"exponential backoff jitter algorithm",{"type":30,"value":271}," inside your integration codebase to handle ",{"type":24,"tag":89,"props":273,"children":275},{"className":274},[],[276],{"type":30,"value":223},{"type":30,"value":278}," error responses.",{"title":7,"searchDepth":280,"depth":280,"links":281},2,[282,283,284],{"id":41,"depth":280,"text":44},{"id":123,"depth":280,"text":126},{"id":214,"depth":280,"text":285},"Handling Rate Limit Exceeded Errors (429)","markdown","content:developer:getting-started:rate-limits.md","content","developer\u002Fgetting-started\u002Frate-limits.md","developer\u002Fgetting-started\u002Frate-limits","md",[293,296,299],{"_path":294,"title":295},"\u002Fdeveloper\u002Fgetting-started\u002Fauthentication","Authentication",{"_path":297,"title":298},"\u002Fdeveloper\u002Fgetting-started\u002Fintroduction","Introduction",{"_path":4,"title":8},1780423178274]