{"id":250,"date":"2026-10-04T02:14:40","date_gmt":"2026-10-04T02:14:40","guid":{"rendered":"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/04\/llm-429-retry\/"},"modified":"2026-10-09T09:47:49","modified_gmt":"2026-10-09T09:47:49","slug":"llm-429-retry","status":"publish","type":"post","link":"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/04\/llm-429-retry\/","title":{"rendered":"\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\uff1a\u9000\u907f\u3001\u6296\u52a8\u4e0e\u8def\u7531\u964d\u7ea7"},"content":{"rendered":"<p><em>\u4f5c\u8005\uff1anTokenX\uff5c\u53d1\u5e03\u65e5\u671f\uff1a2026-10-04\uff5c\u66f4\u65b0\u65e5\u671f\uff1a2026-10-04<\/em><\/p>\n<p><strong>\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565<\/strong>\u4e0d\u80fd\u53ea\u662f\u6355\u83b7\u5f02\u5e38\u540e\u7acb\u5373\u91cd\u53d1\u3002\u751f\u4ea7\u73af\u5883\u5e94\u5148\u5224\u65ad\u9650\u6d41\u539f\u56e0\uff0c\u518d\u6309 <code>Retry-After<\/code>\u3001\u6307\u6570\u9000\u907f\u3001\u968f\u673a\u6296\u52a8\u3001\u91cd\u8bd5\u9884\u7b97\u548c\u8def\u7531\u964d\u7ea7\u7684\u987a\u5e8f\u5904\u7406\uff0c\u5426\u5219\u91cd\u8bd5\u672c\u8eab\u53ef\u80fd\u653e\u5927\u6d41\u91cf\u5cf0\u503c\u3002<\/p>\n<h2>\u5927\u6a21\u578b API \u4e3a\u4ec0\u4e48\u4f1a\u8fd4\u56de 429\uff1f<\/h2>\n<p><strong>HTTP 429 \u8868\u793a\u5f53\u524d\u8bf7\u6c42\u56e0\u901f\u7387\u3001Token\u3001\u5e76\u53d1\u6216\u8d26\u6237\u914d\u989d\u9650\u5236\u800c\u672a\u88ab\u63a5\u53d7\uff0c\u4f46\u5e76\u975e\u6240\u6709 429 \u90fd\u9002\u5408\u81ea\u52a8\u91cd\u8bd5\u3002<\/strong> \u4e34\u65f6\u9650\u6d41\u53ef\u4ee5\u7b49\u5f85\u6062\u590d\uff0c\u4f59\u989d\u3001\u6d88\u8d39\u4e0a\u9650\u6216\u957f\u671f\u914d\u989d\u8017\u5c3d\u5219\u9700\u8981\u4eba\u5de5\u5904\u7406\u3002<\/p>\n<p>\u5e38\u89c1\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:1.5em 0;font-size:0.95em;\">\n<thead>\n<tr>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">429 \u7c7b\u578b<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u8bc6\u522b\u4fe1\u53f7<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u6b63\u786e\u52a8\u4f5c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u8bf7\u6c42\u901f\u7387\u8d85\u9650<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">RPM\u3001QPS \u5269\u4f59\u91cf\u5f52\u96f6<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5ef6\u8fdf\u540e\u91cd\u8bd5\u5e76\u964d\u4f4e\u53d1\u9001\u901f\u5ea6<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Token \u901f\u7387\u8d85\u9650<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">TPM\u3001\u8f93\u5165\u6216\u8f93\u51fa Token \u8d85\u9650<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7f29\u77ed\u4e0a\u4e0b\u6587\u5e76\u9650\u5236\u5e76\u53d1<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7a81\u53d1\u6d41\u91cf\u9650\u5236<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5e73\u5747\u7528\u91cf\u6b63\u5e38\uff0c\u4f46\u77ac\u65f6\u8bf7\u6c42\u6fc0\u589e<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5e73\u6ed1\u6d41\u91cf\uff0c\u52a0\u5165\u968f\u673a\u6296\u52a8<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5e76\u53d1\u69fd\u4f4d\u8017\u5c3d<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u957f\u8fde\u63a5\u6216\u6d41\u5f0f\u8bf7\u6c42\u8fc7\u591a<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6392\u961f\uff0c\u4e0d\u8981\u7acb\u5373\u91cd\u653e<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u8d26\u6237\u914d\u989d\u6216\u6d88\u8d39\u4e0a\u9650<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u9519\u8bef\u4f53\u63d0\u793a\u989d\u5ea6\u3001\u4f59\u989d\u6216\u8d26\u5355\u95ee\u9898<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u505c\u6b62\u91cd\u8bd5\u5e76\u544a\u8b66<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>OpenAI \u660e\u786e\u6307\u51fa\uff0c429 \u65e2\u53ef\u80fd\u662f\u4e34\u65f6\u901f\u7387\u9650\u5236\uff0c\u4e5f\u53ef\u80fd\u6765\u81ea\u4f59\u989d\u6216\u4f7f\u7528\u4e0a\u9650\uff1bAnthropic \u7684\u901f\u7387\u9650\u5236\u5219\u6309\u8bf7\u6c42\u3001\u8f93\u5165 Token \u548c\u8f93\u51fa Token \u7b49\u7ef4\u5ea6\u8ba1\u7b97\u3002(<a href=\"https:\/\/developers.openai.com\/api\/docs\/guides\/rate-limits\">developers.openai.com<\/a>)<\/p>\n<figure class=\"wp-block-image size-large\" style=\"margin:1.5em 0;\"><img decoding=\"async\" src=\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/backend-5059-1.jpg\" alt=\"\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\u51b3\u7b56\u6d41\u7a0b\" style=\"max-width:100%;height:auto;\"><\/figure>\n<h2>\u6536\u5230 429 \u540e\u5e94\u8be5\u6309\u4ec0\u4e48\u987a\u5e8f\u5904\u7406\uff1f<\/h2>\n<p><strong>\u6b63\u786e\u6d41\u7a0b\u662f\uff1a\u89e3\u6790\u9519\u8bef\u7c7b\u578b\uff0c\u4f18\u5148\u9075\u5b88\u670d\u52a1\u7aef\u7b49\u5f85\u65f6\u95f4\uff0c\u518d\u6267\u884c\u5e26\u6296\u52a8\u7684\u622a\u65ad\u6307\u6570\u9000\u907f\uff1b\u8d85\u8fc7\u603b\u65f6\u9650\u540e\u8fdb\u5165\u961f\u5217\u3001\u5207\u6362\u8def\u7531\u6216\u5feb\u901f\u5931\u8d25\u3002<\/strong><\/p>\n<ol>\n<li>\u8bfb\u53d6 HTTP \u72b6\u6001\u7801\u3001\u9519\u8bef\u7801\u548c\u9519\u8bef\u6d88\u606f\u3002<\/li>\n<li>\u68c0\u67e5 <code>Retry-After<\/code> \u53ca\u9650\u6d41\u91cd\u7f6e\u54cd\u5e94\u5934\u3002<\/li>\n<li>\u6392\u9664\u4f59\u989d\u4e0d\u8db3\u3001\u6d88\u8d39\u4e0a\u9650\u548c\u6c38\u4e45\u914d\u989d\u95ee\u9898\u3002<\/li>\n<li>\u786e\u8ba4\u8bf7\u6c42\u662f\u5426\u53ef\u5b89\u5168\u91cd\u8bd5\uff0c\u5c24\u5176\u662f\u5de5\u5177\u8c03\u7528\u4e0e\u5199\u64cd\u4f5c\u3002<\/li>\n<li>\u6ca1\u6709\u6709\u6548\u7b49\u5f85\u65f6\u95f4\u65f6\uff0c\u4f7f\u7528\u6307\u6570\u9000\u907f\u52a0\u968f\u673a\u6296\u52a8\u3002<\/li>\n<li>\u8fbe\u5230\u6b21\u6570\u6216\u603b\u65f6\u95f4\u4e0a\u9650\u540e\u505c\u6b62\u91cd\u8bd5\u3002<\/li>\n<li>\u5c06\u4efb\u52a1\u653e\u56de\u961f\u5217\uff0c\u6216\u5207\u6362\u5df2\u901a\u8fc7\u517c\u5bb9\u6027\u9a8c\u8bc1\u7684\u6a21\u578b\u901a\u9053\u3002<\/li>\n<\/ol>\n<p>OpenAI \u548c Anthropic \u90fd\u5efa\u8bae\u9075\u5b88 <code>Retry-After<\/code>\uff1bGoogle Gemini \u6587\u6863\u5219\u5efa\u8bae\u5bf9\u53ef\u6062\u590d\u7684 429\u3001408 \u4e0e\u90e8\u5206 5xx \u4f7f\u7528\u6307\u6570\u9000\u907f\uff0c\u5e76\u8bbe\u7f6e\u6700\u5927\u91cd\u8bd5\u6b21\u6570\u3002(<a href=\"https:\/\/developers.openai.com\/api\/docs\/guides\/rate-limits\">developers.openai.com<\/a>)<\/p>\n<h2>\u6307\u6570\u9000\u907f\u548c\u968f\u673a\u6296\u52a8\u5982\u4f55\u8ba1\u7b97\uff1f<\/h2>\n<p><strong>\u63a8\u8350\u4f7f\u7528\u5168\u6296\u52a8\u622a\u65ad\u9000\u907f\uff1a\u6bcf\u8f6e\u5148\u8ba1\u7b97\u6307\u6570\u4e0a\u9650\uff0c\u518d\u4ece\u96f6\u5230\u8be5\u4e0a\u9650\u4e4b\u95f4\u968f\u673a\u7b49\u5f85\u3002<\/strong> \u5b83\u6bd4\u56fa\u5b9a\u95f4\u9694\u66f4\u80fd\u5206\u6563\u5e76\u53d1\u5ba2\u6237\u7aef\uff0c\u907f\u514d\u6062\u590d\u65f6\u518d\u6b21\u5f62\u6210\u201c\u60ca\u7fa4\u201d\u3002<\/p>\n<pre><code class=\"language-text\">\u9000\u907f\u4e0a\u9650 = min(\u6700\u5927\u5ef6\u8fdf, \u57fa\u7840\u5ef6\u8fdf \u00d7 2^\u91cd\u8bd5\u6b21\u6570)\n\u5b9e\u9645\u7b49\u5f85 = random(0, \u9000\u907f\u4e0a\u9650)\n<\/code><\/pre>\n<p>\u4ee5\u57fa\u7840\u5ef6\u8fdf 500 \u6beb\u79d2\u3001\u6700\u591a\u91cd\u8bd5 4 \u6b21\u4e3a\u4f8b\uff1a<\/p>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:1.5em 0;font-size:0.95em;\">\n<thead>\n<tr>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u91cd\u8bd5\u8f6e\u6b21<\/th>\n<th style=\"text-align:right\">\u65e0\u6296\u52a8\u7b49\u5f85<\/th>\n<th style=\"text-align:right\">\u5168\u6296\u52a8\u8303\u56f4<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7b2c 1 \u6b21<\/td>\n<td style=\"text-align:right\">0.5 \u79d2<\/td>\n<td style=\"text-align:right\">0\uff5e0.5 \u79d2<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7b2c 2 \u6b21<\/td>\n<td style=\"text-align:right\">1 \u79d2<\/td>\n<td style=\"text-align:right\">0\uff5e1 \u79d2<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7b2c 3 \u6b21<\/td>\n<td style=\"text-align:right\">2 \u79d2<\/td>\n<td style=\"text-align:right\">0\uff5e2 \u79d2<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u7b2c 4 \u6b21<\/td>\n<td style=\"text-align:right\">4 \u79d2<\/td>\n<td style=\"text-align:right\">0\uff5e4 \u79d2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u56db\u8f6e\u65e0\u6296\u52a8\u7d2f\u8ba1\u7b49\u5f85\u4e3a 7.5 \u79d2\uff0c\u5168\u6296\u52a8\u7684\u7406\u8bba\u5e73\u5747\u7d2f\u8ba1\u7b49\u5f85\u4e3a 3.75 \u79d2\u3002\u82e5 1,000 \u4e2a\u5ba2\u6237\u7aef\u540c\u65f6\u5931\u8d25\u5e76\u56fa\u5b9a\u7b49\u5f85 1 \u79d2\uff0c\u5b83\u4eec\u4f1a\u518d\u6b21\u540c\u65f6\u53d1\u9001 1,000 \u4e2a\u8bf7\u6c42\uff1b\u9996\u8f6e\u91c7\u7528 0\uff5e0.5 \u79d2\u5168\u6296\u52a8\u540e\uff0c\u6309 100 \u6beb\u79d2\u65f6\u95f4\u6876\u6f14\u7b97\uff0c\u5e73\u5747\u7ea6\u6709 200 \u4e2a\u8bf7\u6c42\u843d\u5165\u6bcf\u4e2a\u6876\uff0c\u5cf0\u503c\u538b\u529b\u88ab\u660e\u663e\u644a\u5f00\u3002\u8fd9\u662f\u53c2\u6570\u5316\u5bb9\u91cf\u6f14\u7b97\uff0c\u4e0d\u4ee3\u8868\u7279\u5b9a\u6a21\u578b\u5382\u5546\u7684\u5b9e\u6d4b\u6027\u80fd\u3002<\/p>\n<h2>TypeScript \u5982\u4f55\u5b9e\u73b0\u53ef\u63a7\u7684 429 \u81ea\u52a8\u91cd\u8bd5\uff1f<\/h2>\n<p><strong>\u751f\u4ea7\u4ee3\u7801\u81f3\u5c11\u8981\u540c\u65f6\u9650\u5236\u91cd\u8bd5\u6b21\u6570\u3001\u5355\u6b21\u5ef6\u8fdf\u548c\u603b\u622a\u6b62\u65f6\u95f4\uff0c\u5e76\u907f\u514d\u4e0e SDK \u5185\u7f6e\u91cd\u8bd5\u53e0\u52a0\u3002<\/strong> \u5426\u5219\u5ba2\u6237\u7aef\u91cd\u8bd5\u4e09\u6b21\u3001SDK \u518d\u91cd\u8bd5\u4e09\u6b21\uff0c\u6700\u574f\u53ef\u80fd\u6269\u5f20\u4e3a\u591a\u5c42\u91cd\u590d\u8bf7\u6c42\u3002<\/p>\n<pre><code class=\"language-typescript\">const sleep = (ms: number) =&gt;\n  new Promise(resolve =&gt; setTimeout(resolve, ms));\n\nasync function callWithRetry&lt;T&gt;(\n  send: () =&gt; Promise&lt;T&gt;,\n  maxAttempts = 4,\n  deadlineMs = 12_000\n): Promise&lt;T&gt; {\n  const startedAt = Date.now();\n\n  for (let attempt = 0; attempt &lt; maxAttempts; attempt++) {\n    try {\n      return await send();\n    } catch (error: any) {\n      const status = error?.status;\n      const code = error?.code;\n      const retryAfter = Number(error?.headers?.[&quot;retry-after&quot;]);\n\n      const temporary429 =\n        status === 429 &amp;&amp;\n        ![&quot;credit_balance_exhausted&quot;, &quot;quota_exceeded&quot;]\n          .includes(code);\n\n      if (!temporary429 || attempt === maxAttempts - 1) throw error;\n\n      const exponentialCap = Math.min(8000, 500 * 2 ** attempt);\n      const fallbackDelay = Math.random() * exponentialCap;\n      const delayMs = Number.isFinite(retryAfter)\n        ? retryAfter * 1000 + Math.random() * 250\n        : fallbackDelay;\n\n      if (Date.now() - startedAt + delayMs &gt; deadlineMs) throw error;\n      await sleep(delayMs);\n    }\n  }\n\n  throw new Error(&quot;\u91cd\u8bd5\u9884\u7b97\u5df2\u8017\u5c3d&quot;);\n}\n<\/code><\/pre>\n<p>\u63a5\u5165\u524d\u8fd8\u5e94\u6838\u5bf9\u6240\u7528 SDK \u7684\u9ed8\u8ba4\u884c\u4e3a\u3002OpenAI \u5b98\u65b9\u6587\u6863\u63d0\u793a\uff0c\u5176 SDK \u4f1a\u81ea\u52a8\u91cd\u8bd5\u7b26\u5408\u6761\u4ef6\u7684 429 \u548c 503\uff0c\u56e0\u6b64\u5e94\u7528\u5c42\u5fc5\u987b\u628a\u5185\u7f6e\u91cd\u8bd5\u8ba1\u5165\u603b\u9884\u7b97\u3002(<a href=\"https:\/\/developers.openai.com\/api\/docs\/guides\/rate-limits\">developers.openai.com<\/a>)<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u53ea\u505a\u81ea\u52a8\u91cd\u8bd5\u4ecd\u7136\u4e0d\u591f\uff1f<\/h2>\n<p><strong>429 \u901a\u5e38\u662f\u5bb9\u91cf\u7ba1\u7406\u95ee\u9898\uff0c\u800c\u4e0d\u53ea\u662f\u5f02\u5e38\u5904\u7406\u95ee\u9898\u3002<\/strong> \u5982\u679c\u5165\u53e3\u6ca1\u6709\u5e76\u53d1\u9650\u5236\uff0c\u5927\u91cf\u8bf7\u6c42\u4f1a\u5728\u5931\u8d25\u3001\u4f11\u7720\u548c\u518d\u6b21\u5931\u8d25\u4e4b\u95f4\u5faa\u73af\uff0c\u589e\u52a0\u5ef6\u8fdf\u5e76\u6301\u7eed\u6d88\u8017\u901f\u7387\u7a97\u53e3\u3002<\/p>\n<p>\u5efa\u8bae\u5efa\u7acb\u56db\u5c42\u9632\u7ebf\uff1a<\/p>\n<ul>\n<li><strong>\u5165\u53e3\u5c42\uff1a<\/strong> \u4f7f\u7528\u4ee4\u724c\u6876\u6216\u4fe1\u53f7\u91cf\u9650\u5236\u5e76\u53d1\uff0c\u6309\u79df\u6237\u9694\u79bb\u914d\u989d\u3002<\/li>\n<li><strong>\u6267\u884c\u5c42\uff1a<\/strong> \u9884\u4f30\u8f93\u5165\u4e0e\u6700\u5927\u8f93\u51fa Token\uff0c\u907f\u514d\u5355\u4e2a\u8bf7\u6c42\u5360\u6ee1 TPM\u3002<\/li>\n<li><strong>\u91cd\u8bd5\u5c42\uff1a<\/strong> \u8bbe\u7f6e\u6b21\u6570\u3001\u622a\u6b62\u65f6\u95f4\u548c\u91cd\u8bd5\u6d41\u91cf\u5360\u6bd4\u3002<\/li>\n<li><strong>\u8def\u7531\u5c42\uff1a<\/strong> \u8fde\u7eed\u89e6\u53d1\u9608\u503c\u540e\u7194\u65ad\u5f53\u524d\u901a\u9053\uff0c\u8f6c\u5165\u961f\u5217\u6216\u5907\u7528\u6a21\u578b\u3002<\/li>\n<\/ul>\n<p>\u591a\u79df\u6237\u5e94\u7528\u53ef\u53c2\u8003<a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/09\/29\/multi-tenant-saas-quota-isolation\/\">\u591a\u79df\u6237 SaaS \u5927\u6a21\u578b\u914d\u989d\u9694\u79bb\u65b9\u6848<\/a>\uff0c\u907f\u514d\u5355\u4e2a\u5ba2\u6237\u7684\u7a81\u53d1\u4efb\u52a1\u8017\u5c3d\u5171\u4eab\u989d\u5ea6\u3002\u6d89\u53ca\u8de8\u901a\u9053\u6062\u590d\u65f6\uff0c\u8fd8\u5e94\u914d\u5408<a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/03\/llm-api-failover\/\">\u5927\u6a21\u578b API \u591a\u4e91\u5bb9\u707e\u3001\u7194\u65ad\u4e0e\u81ea\u52a8\u964d\u7ea7\u65b9\u6848<\/a>\uff0c\u800c\u4e0d\u662f\u65e0\u9650\u5ef6\u957f\u91cd\u8bd5\u94fe\u3002<\/p>\n<figure class=\"wp-block-image size-large\" style=\"margin:1.5em 0;\"><img decoding=\"async\" src=\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/backend-5059-2.jpg\" alt=\"429\u9650\u6d41\u4e0b\u7684\u961f\u5217\u3001\u91cd\u8bd5\u9884\u7b97\u4e0e\u591a\u6a21\u578b\u8def\u7531\u67b6\u6784\" style=\"max-width:100%;height:auto;\"><\/figure>\n<h2>\u591a\u6a21\u578b API \u7f51\u5173\u5982\u4f55\u964d\u4f4e 429 \u5f71\u54cd\uff1f<\/h2>\n<p><strong>\u7edf\u4e00\u7f51\u5173\u7684\u4ef7\u503c\u4e0d\u662f\u65e0\u6761\u4ef6\u91cd\u653e\u8bf7\u6c42\uff0c\u800c\u662f\u96c6\u4e2d\u5b8c\u6210\u9650\u6d41\u89c2\u6d4b\u3001\u5e76\u53d1\u6574\u5f62\u3001\u901a\u9053\u5065\u5eb7\u68c0\u67e5\u548c\u53d7\u63a7\u964d\u7ea7\u3002<\/strong> \u8def\u7531\u5207\u6362\u524d\u5fc5\u987b\u786e\u8ba4\u6a21\u578b\u80fd\u529b\u3001\u4e0a\u4e0b\u6587\u957f\u5ea6\u3001\u5de5\u5177\u534f\u8bae\u548c\u8f93\u51fa\u683c\u5f0f\u517c\u5bb9\u3002<\/p>\n<p>nTokenX \u5141\u8bb8\u7528\u6237\u7533\u8bf7\u4e00\u4e2a API Key\uff0c\u8c03\u7528 GPT\u3001Claude\u3001Gemini\u3001Grok \u7b49\u591a\u4e2a\u6a21\u578b\u3002\u5de5\u7a0b\u56e2\u961f\u53ef\u5728\u7edf\u4e00\u63a5\u5165\u5c42\u4e3a\u4e0d\u540c\u4e1a\u52a1\u8bbe\u7f6e\u5019\u9009\u6a21\u578b\uff0c\u4f46\u4ecd\u9700\u81ea\u884c\u5b9a\u4e49\u7194\u65ad\u9608\u503c\u3001\u8d85\u65f6\u9884\u7b97\u548c\u964d\u7ea7\u8fb9\u754c\u3002<\/p>\n<p>\u9009\u62e9\u6b64\u7c7b\u670d\u52a1\u65f6\uff0c\u5e94\u533a\u5206\u6b63\u89c4 API \u805a\u5408\u7f51\u5173\u4e0e\u7b2c\u4e09\u65b9\u6a21\u578b\u4e2d\u8f6c\uff0c\u91cd\u70b9\u6838\u9a8c\u6388\u6743\u65b9\u5f0f\u3001\u54cd\u5e94\u5934\u900f\u4f20\u3001\u65e5\u5fd7\u8131\u654f\u548c\u6570\u636e\u5b89\u5168\u3002\u81ea\u5efa\u4e0e\u6258\u7ba1\u65b9\u6848\u7684\u53d6\u820d\u53ef\u7ed3\u5408<a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/09\/26\/oneapi-commercial-ai-gateway-stability\/\">OneAPI \u4e0e\u5546\u4e1a AI \u7f51\u5173\u7a33\u5b9a\u6027\u5bf9\u6bd4<\/a>\u8bc4\u4f30\u3002<\/p>\n<h2>\u54ea\u4e9b\u8bf7\u6c42\u4e0d\u5e94\u8be5\u81ea\u52a8\u91cd\u8bd5\uff1f<\/h2>\n<p><strong>\u8ba4\u8bc1\u5931\u8d25\u3001\u53c2\u6570\u9519\u8bef\u3001\u4f59\u989d\u8017\u5c3d\u4ee5\u53ca\u5df2\u4ea7\u751f\u5916\u90e8\u526f\u4f5c\u7528\u7684\u8bf7\u6c42\uff0c\u4e0d\u5e94\u4ec5\u51ed\u72b6\u6001\u7801\u53cd\u590d\u6267\u884c\u3002<\/strong> \u6d41\u5f0f\u54cd\u5e94\u5df2\u7ecf\u8f93\u51fa\u90e8\u5206\u5185\u5bb9\u65f6\uff0c\u4e5f\u4e0d\u80fd\u628a\u7b2c\u4e8c\u6b21\u751f\u6210\u76f4\u63a5\u62fc\u63a5\u5230\u7b2c\u4e00\u6b21\u7ed3\u679c\u4e4b\u540e\u3002<\/p>\n<p>\u4ee5\u4e0b\u573a\u666f\u5e94\u505c\u6b62\u6216\u8c28\u614e\u91cd\u8bd5\uff1a<\/p>\n<ul>\n<li><code>400<\/code> \u53c2\u6570\u6216\u8bf7\u6c42\u7ed3\u6784\u9519\u8bef\uff1b<\/li>\n<li><code>401<\/code>\u3001<code>403<\/code> \u9274\u6743\u53ca\u6743\u9650\u9519\u8bef\uff1b<\/li>\n<li>\u660e\u786e\u7684\u4f59\u989d\u3001\u8d26\u5355\u6216\u6c38\u4e45\u914d\u989d\u9519\u8bef\uff1b<\/li>\n<li>\u5df2\u6267\u884c\u652f\u4ed8\u3001\u53d1\u4fe1\u3001\u5199\u5e93\u7b49\u5de5\u5177\u8c03\u7528\uff1b<\/li>\n<li>SSE \u6d41\u5df2\u7ecf\u8fd4\u56de\u90e8\u5206\u6587\u672c\u540e\u4e2d\u65ad\uff1b<\/li>\n<li>\u7528\u6237\u5df2\u7ecf\u53d6\u6d88\u8bf7\u6c42\u6216\u4e1a\u52a1\u622a\u6b62\u65f6\u95f4\u5df2\u8fc7\u3002<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u53ef\u80fd\u4ea7\u751f\u526f\u4f5c\u7528\u7684\u64cd\u4f5c\uff0c\u5e94\u8bbe\u7f6e\u5e42\u7b49\u952e\uff0c\u5e76\u5c06\u201c\u6a21\u578b\u751f\u6210\u201d\u548c\u201c\u5de5\u5177\u6267\u884c\u201d\u62c6\u6210\u4e24\u4e2a\u9636\u6bb5\u3002Google Cloud \u7684\u91cd\u8bd5\u6307\u5357\u540c\u6837\u5f3a\u8c03\uff0c\u975e\u5e42\u7b49\u64cd\u4f5c\u88ab\u91cd\u590d\u6267\u884c\u53ef\u80fd\u4ea7\u751f\u989d\u5916\u526f\u4f5c\u7528\u3002(<a href=\"https:\/\/docs.cloud.google.com\/storage\/docs\/retry-strategy\">docs.cloud.google.com<\/a>)<\/p>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<h3>429 \u51fa\u73b0\u540e\u7b49\u5f85 1 \u79d2\u518d\u91cd\u8bd5\u53ef\u4ee5\u5417\uff1f<\/h3>\n<p>\u53ef\u4ee5\u4f5c\u4e3a\u4f4e\u5e76\u53d1\u6d4b\u8bd5\u7684\u4e34\u65f6\u65b9\u6848\uff0c\u4f46\u4e0d\u9002\u5408\u751f\u4ea7\u73af\u5883\u3002\u56fa\u5b9a\u7b49\u5f85\u4f1a\u4f7f\u5927\u91cf\u5b9e\u4f8b\u540c\u65f6\u6062\u590d\u8bf7\u6c42\uff0c\u5e94\u4f18\u5148\u8bfb\u53d6 <code>Retry-After<\/code>\uff0c\u7f3a\u5931\u65f6\u4f7f\u7528\u5e26\u968f\u673a\u6296\u52a8\u7684\u6307\u6570\u9000\u907f\u3002<\/p>\n<h3>\u81ea\u52a8\u91cd\u8bd5\u8bbe\u7f6e\u51e0\u6b21\u6bd4\u8f83\u5408\u9002\uff1f<\/h3>\n<p>\u4ea4\u4e92\u8bf7\u6c42\u901a\u5e38\u53ef\u4ece 2\uff5e4 \u6b21\u5f00\u59cb\uff0c\u5e76\u540c\u65f6\u8bbe\u7f6e 8\uff5e15 \u79d2\u603b\u622a\u6b62\u65f6\u95f4\uff1b\u79bb\u7ebf\u4efb\u52a1\u53ef\u4ee5\u91c7\u7528\u66f4\u957f\u9884\u7b97\u3002\u6700\u7ec8\u53c2\u6570\u5e94\u6839\u636e\u4e1a\u52a1\u5ef6\u8fdf\u76ee\u6807\u3001\u4f9b\u5e94\u5546\u9650\u5236\u548c\u4efb\u52a1\u662f\u5426\u53ef\u6392\u961f\u786e\u5b9a\u3002<\/p>\n<h3>\u6362\u4e00\u4e2a API Key \u80fd\u89e3\u51b3 429 \u5417\uff1f<\/h3>\n<p>\u4e0d\u4e00\u5b9a\u3002\u90e8\u5206\u5382\u5546\u6309\u9879\u76ee\u3001\u7ec4\u7ec7\u3001\u8d26\u6237\u6216\u6a21\u578b\u7edf\u4e00\u8ba1\u91cf\uff0c\u591a\u628a Key \u53ef\u80fd\u4ecd\u5171\u4eab\u540c\u4e00\u9650\u989d\u3002\u5e94\u5148\u8bfb\u53d6\u9519\u8bef\u4fe1\u606f\u4e0e\u9650\u6d41\u54cd\u5e94\u5934\uff0c\u4e0d\u8981\u628a\u8f6e\u6362 Key \u5f53\u4f5c\u9ed8\u8ba4\u65b9\u6848\u3002<\/p>\n<h3>429 \u662f\u5426\u5e94\u8be5\u7acb\u5373\u5207\u6362\u6a21\u578b\uff1f<\/h3>\n<p>\u4e0d\u5e94\u5728\u9996\u6b21 429 \u540e\u7acb\u5373\u5207\u6362\u3002\u77ed\u6682\u9650\u6d41\u53ef\u5148\u9000\u907f\uff1b\u53ea\u6709\u8fde\u7eed\u5931\u8d25\u3001\u9884\u8ba1\u7b49\u5f85\u8d85\u8fc7\u7528\u6237\u622a\u6b62\u65f6\u95f4\uff0c\u4e14\u5907\u7528\u6a21\u578b\u901a\u8fc7\u80fd\u529b\u4e0e\u5b89\u5168\u9a8c\u8bc1\u65f6\uff0c\u624d\u9002\u5408\u964d\u7ea7\u8def\u7531\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p><strong>\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\u7684\u6838\u5fc3\uff0c\u662f\u63a7\u5236\u91cd\u8bd5\u6d41\u91cf\uff0c\u800c\u4e0d\u662f\u8ffd\u6c42\u66f4\u591a\u91cd\u8bd5\u6b21\u6570\u3002<\/strong> \u5148\u533a\u5206\u4e34\u65f6\u9650\u6d41\u4e0e\u6c38\u4e45\u989d\u5ea6\u95ee\u9898\uff0c\u518d\u4f9d\u6b21\u5e94\u7528 <code>Retry-After<\/code>\u3001\u5168\u6296\u52a8\u6307\u6570\u9000\u907f\u3001\u5e76\u53d1\u6574\u5f62\u3001\u603b\u91cd\u8bd5\u9884\u7b97\u548c\u7194\u65ad\u8def\u7531\uff0c\u624d\u80fd\u5728\u63d0\u9ad8\u6210\u529f\u7387\u7684\u540c\u65f6\u907f\u514d\u60ca\u7fa4\u4e0e\u91cd\u590d\u6267\u884c\u3002<\/p>\n<p><script type=\"application\/ld+json\">\n{\"@context\":\"https:\/\/schema.org\",\"@type\":\"Article\",\"author\":{\"@type\":\"Organization\",\"name\":\"nTokenX\"},\"dateModified\":\"2026-10-04\",\"datePublished\":\"2026-10-04\",\"description\":\"\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\u5e94\u5148\u8bc6\u522b\u9650\u6d41\u7c7b\u578b\uff0c\u518d\u5904\u7406 Retry-After\u3001\u6307\u6570\u9000\u907f\u3001\u968f\u673a\u6296\u52a8\u3001\u91cd\u8bd5\u9884\u7b97\u4e0e\u5e76\u53d1\u6574\u5f62\u3002\u672c\u6587\u63d0\u4f9b\u53ef\u590d\u73b0\u6f14\u7b97\u3001TypeScript \u793a\u4f8b\u53ca\u591a\u6a21\u578b\u7f51\u5173\u964d\u7ea7\u6846\u67b6\uff0c\u5e2e\u52a9\u4f60\u51cf\u5c11\u60ca\u7fa4\u3001\u91cd\u590d\u8c03\u7528\u548c\u65e0\u6548\u91cd\u8bd5\uff0c\u7acb\u5373\u6309\u6e05\u5355\u6539\u9020\u751f\u4ea7\u94fe\u8def\u3002\",\"headline\":\"\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\uff1a\u9000\u907f\u3001\u6296\u52a8\u4e0e\u8def\u7531\u964d\u7ea7\",\"image\":\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/art-8656-cover.jpg\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"nTokenX\"}}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u6a21\u578b\u63a5\u53e3\u8c03\u7528\u9519\u8bef\u7801429\u81ea\u52a8\u91cd\u8bd5\u7b56\u7565\u5e94\u5148\u8bc6\u522b\u9650\u6d41\u7c7b\u578b\uff0c\u518d\u5904\u7406 Retry-After\u3001\u6307\u6570\u9000\u907f\u3001\u968f\u673a\u6296\u52a8\u3001\u91cd\u8bd5\u9884\u7b97\u4e0e\u5e76\u53d1\u6574\u5f62\u3002\u672c\u6587\u63d0\u4f9b\u53ef\u590d\u73b0\u6f14\u7b97\u3001TypeScript \u793a\u4f8b\u53ca\u591a\u6a21\u578b\u7f51\u5173\u964d\u7ea7\u6846\u67b6\uff0c\u5e2e\u52a9\u4f60\u51cf\u5c11\u60ca\u7fa4\u3001\u91cd\u590d\u8c03\u7528\u548c\u65e0\u6548\u91cd\u8bd5\uff0c\u7acb\u5373\u6309\u6e05\u5355\u6539\u9020\u751f\u4ea7\u94fe\u8def\u3002<\/p>\n","protected":false},"author":1,"featured_media":249,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":1,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/250\/revisions\/287"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/249"}],"wp:attachment":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}