Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts
Three golden rules that cover 90% of timeout problems:
Set a 360-second timeout for synchronous image endpoints. Image generation has no async task ID — disconnecting early means you are still billed but get no image.
Give reasoning models enough time.gemini-3.1-pro-preview, gpt-5.6-sol, and gpt-5.5-pro can take several minutes, whether you stream or not.
Never run long requests through the CDN node.api-cf.apiyi.com sits behind Cloudflare and returns 524 past roughly 100 seconds; it only suits fast text calls.
Separately: if a specific model keeps returning 429 (insufficient concurrency), contact support to review your quota.
A timed-out request is still billedAfter your client disconnects, the server and upstream provider still finish the job, and the request is billed as usual.In other words: a timeout set too low means you paid and got nothing. Set it to a safe upper bound once rather than letting a nearly-successful request get cut off by your own client.
① Synchronous image endpoints: set the timeout to 360 seconds
All APIYI image models are synchronous: you send the request, hold the connection, and the result comes back in the response body. There is no async task ID and no polling endpoint — disconnect and the result is gone.Why defaults hurt you: mainstream HTTP clients default to 30-60 seconds, while image generation is a genuinely long request:
GPT-Image-2 at high quality with 2K/4K takes 3-5 minutes in practice
Nano Banana 4K generation starts around 50 seconds and runs longer at peak
Multi-image reference tasks often exceed 5 minutes
Recommendation: when unsure about a model’s latency, use 360 seconds as a baseline; give heavy tasks like 4K and multi-image reference 600 seconds. Per-model values are in Image API best practices.
Occasionally a log shows the image finished in 30 seconds while the client waited 5 minutes — because the log’s duration only runs to the point where the gateway finishes processing, while you wait for the body to finish arriving and for the connection’s finish signal. Raising the timeout does not always help: it does for the slow-download class, but not when the data is already complete and only the finish signal is missing. Measure once following The log says it finished but my client got nothing, then decide.
② Reasoning / long-output models: non-streaming can't hold, use streaming
Regular text models return in seconds, which makes it easy to assume text calls never need timeout tuning. Reasoning models — and any workload that produces tens of thousands of characters in one call — are the exception:
gemini-3.1-pro-preview
gpt-5.6-sol
gpt-5.5-pro (pricier and slower)
claude-opus-5 and other models running deep thinking / high effort
Long-output tasks: drama scripts, fiction, long translations, large code generation
These calls reason for a long time, then emit a long body token by token, and ten-plus minutes of total latency is normal.Key point: non-streaming can’t hold, but streaming with a sensible read timeout solves it. Non-streaming buffers the whole generation and sends it at once, so your read timeout has to race the entire generation and any hiccup breaks it. With streaming the first byte arrives within seconds, and after that a data event arrives every few tens of seconds (measured max silent gap during thinking ~42s, with keepalive pings in between), so your read timeout only has to cover the inter-event gap, not the total time.Recommendation:
Prefer streaming for long output (stream=True), with a read timeout of 90-120 seconds sized to the inter-event gap — not one huge value covering the whole generation.
If you insist on non-streaming, set the timeout to 300-600 seconds and accept the instability; the longer it runs the more likely you disconnect before the result arrives.
Match your thinking tier (reasoning_effort / thinking) to the time you have allowed — a higher tier needs more headroom.
For the full long-output recipe (streaming code, max_tokens, stop_reason, retries) see Long-form Output Practices.
③ Base URL selection: the CDN node cannot carry long requests
APIYI’s api-cf.apiyi.com is fronted by the Cloudflare global CDN. It offers worldwide acceleration and low latency from overseas, but it has a request timeout of roughly 100 seconds, past which you get a 524 error.⚠️ This affects more than image endpoints. Any call that might exceed 100 seconds is a poor fit, including:
❌ Image generation / editing
❌ Video generation
❌ Long text output (long articles, large translations, big code generations)
❌ Deep-thinking tasks on reasoning models
✅ Good fit: regular chat and short generations that finish within 100 seconds.Recommendation: for long requests use api.apiyi.com (or the backup b.apiyi.com). Full node comparison in the Base URL guide.
④ Hitting 429 concurrency limits: contact support
If timeouts come alongside frequent 429 Too Many Requests, the problem is usually concurrency quota, not your timeout.Concurrency limits apply per model, not across your whole account. A specific model — especially a newly launched or supply-constrained one — may have a lower quota.What to do:
Implement exponential backoff so you do not saturate the limit in bursts
If 429s persist, contact APIYI support — we can check that model’s actual quota and help adjust it
from openai import OpenAIclient = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.apiyi.com/v1", # not the api-cf node for long requests)# Tier your timeouts by scenario (seconds) instead of one global valueTIMEOUTS = { "text": 120, # regular text "reasoning": 600, # reasoning models "image": 360, # image generation baseline "image_4k": 600, # 4K / multi-image reference}resp = client.chat.completions.create( model="gpt-5.6-sol", messages=[{"role": "user", "content": "Analyze the complexity of this code"}], timeout=TIMEOUTS["reasoning"], # 600s for reasoning models)print(resp.choices[0].message.content)
import OpenAI from "openai";const client = new OpenAI({ apiKey: process.env.APIYI_API_KEY, baseURL: "https://api.apiyi.com/v1", timeout: 600 * 1000, // milliseconds — 600s for reasoning models maxRetries: 0, // avoid auto-retry on long requests: it double-bills});const resp = await client.chat.completions.create({ model: "gemini-3.1-pro-preview", messages: [{ role: "user", content: "Write an 8000-word technical analysis" }],});console.log(resp.choices[0].message.content);
# --max-time caps the total request duration in secondscurl https://api.apiyi.com/v1/images/generations \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ --max-time 360 \ -d '{ "model": "gpt-image-2", "prompt": "a serene mountain lake at sunrise", "size": "2048x2048" }'
Be careful with auto-retry on long requests: many SDKs retry twice by default. If an image or reasoning task times out and retries, you can end up billed three times with nothing to show. Set max_retries to 0 and control retries in your own application logic.
Still timing out after raising the timeout? Check every hop
1
Step 1: Confirm the SDK timeout actually applies
Some frameworks wrap another timeout around the HTTP client. Print the effective configuration and confirm the parameter you changed is the one being used.
2
Step 2: Check every hop in the path
Any layer with a timeout shorter than the generation time will disconnect before your client does:
Self-hosted reverse proxy: Nginx proxy_read_timeout (60s by default)
Cloud load balancer: idle connection timeout
API gateway / CDN: origin timeout
Serverless functions: execution limit (often 30-60s by default)
Task queue workers: per-task timeout
Every hop must be widened — changing only the client does nothing.
3
Step 3: Confirm you are not on the CDN node
Check whether your Base URL is api-cf.apiyi.com. For long requests, switch to api.apiyi.com or b.apiyi.com.Rule of thumb: a 524 almost always means a Cloudflare-layer timeout, not a slow model.
4
Step 4: Distinguish timeouts from concurrency limits
Read the status code: 524 and dropped connections are timeout problems; 429 is a quota problem. The fixes are entirely different.
5
Step 5: Check call logs for actual latency
Look up the request’s real duration and billing in the console call logs, then derive a sensible timeout from it.
My image timeout is 200 seconds and usually enough. Why does it still time out sometimes?
Most images finish in a few dozen seconds, so 200 seconds looks generous. But providers queue requests at peak times, and a single generation can occasionally stretch to several minutes. When that happens, the gateway automatically retries on another route in the background, as long as your client is still waiting.If your timeout is too tight, your side closes the connection before the gateway can switch routes, and the request simply fails. So for images, set the timeout to 360 seconds, or 600 seconds for 4K or multiple reference images (see the table above), to leave room for the automatic switch.Also, larger reference images are slower: an edit request with an 8-10MB body spends part of the time just uploading, and the provider takes longer to process it. Where your use case allows, compress reference images to 2048 pixels on the long side and under 2MB each. This is noticeably faster with almost no effect on quality; see Image Compression and Resolution.
Can I get a refund for a request that timed out?
No. Once your client disconnects, the server and upstream still complete the job, so the cost is genuinely incurred.The right approach is to set the timeout to a safe upper bound in one go, rather than using a small value and relying on retries — retries only multiply the bill.
Can you offer an async endpoint so I can fetch results by ID after a disconnect?
Image endpoints currently run in synchronous pass-through mode, and we do not store customer business data, so “retrieve by ID after disconnect” is not available.Recommended pattern: synchronous call + generous timeout + your own task-state table. That is effectively a lightweight async queue. See Are image endpoints synchronous or asynchronous?Video models are natively async and are not affected by this.
Does streaming prevent timeouts?
Partly — but do not rely on it.Streaming does deliver the first token sooner, which reduces the risk of a total no-response. But a reasoning model may emit nothing during the thinking phase, so the read timeout still fires, and the full output takes just as long overall.The correct approach is streaming plus a generous timeout.
Is there a downside to setting a very large timeout?
No billing impact — you are charged for tokens and calls consumed, not for how long you waited.The only concern is resource usage on your side: a long connection holds a worker or connection-pool slot. Under high concurrency, run image and reasoning requests through async IO or a dedicated long-task queue.
What is the difference between 524 and 429?
524: a Cloudflare-layer timeout, meaning you used api-cf.apiyi.com and the request exceeded roughly 100 seconds. Switch nodes.
429: a concurrency or rate limit, unrelated to duration. Add exponential backoff, and contact support if it persists.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"API易文档中心","description":"企业级专业稳定的AI大模型API中转站,一个令牌、无限模型。支持OpenAI、Claude、Gemini、DeepSeek、Qwen等400+热门AI模型。","colors":{"primary":"#2563eb","light":"#3b82f6","dark":"#1d4ed8"},"logo":{"light":"https://mintcdn.com/apiyillc/LjCT1O0GrSur6F2v/logo/light.svg?fit=max\u0026auto=format\u0026n=LjCT1O0GrSur6F2v\u0026q=85\u0026s=4119ef17a74cc54be127f34578d8b5fa","dark":"https://mintcdn.com/apiyillc/LjCT1O0GrSur6F2v/logo/dark.svg?fit=max\u0026auto=format\u0026n=LjCT1O0GrSur6F2v\u0026q=85\u0026s=1f046ae9580247d96549ade642b5ecc4"},"favicon":"https://mintcdn.com/apiyillc/OMY6ItCc2mC1yzgA/logo/logo.webp?fit=max\u0026auto=format\u0026n=OMY6ItCc2mC1yzgA\u0026q=85\u0026s=62a7977ef801070e689df2d0291b9d13","api":{"openapi":["api-reference/nano-banana-2-generate-openapi.yaml","api-reference/nano-banana-2-edit-openapi.yaml","api-reference/nano-banana-2-generate-openapi-en.yaml","api-reference/nano-banana-2-edit-openapi-en.yaml","api-reference/nano-banana-pro-generate-openapi.yaml","api-reference/nano-banana-pro-edit-openapi.yaml","api-reference/nano-banana-pro-generate-openapi-en.yaml","api-reference/nano-banana-pro-edit-openapi-en.yaml","api-reference/gpt-image-2-all-generate-openapi.yaml","api-reference/gpt-image-2-all-edit-openapi.yaml","api-reference/gpt-image-2-all-generate-openapi-en.yaml","api-reference/gpt-image-2-all-edit-openapi-en.yaml","api-reference/gpt-image-2-all-chat-openapi.yaml","api-reference/gpt-image-2-all-chat-openapi-en.yaml","api-reference/gpt-image-2-vip-generate-openapi.yaml","api-reference/gpt-image-2-vip-edit-openapi.yaml","api-reference/gpt-image-2-vip-chat-openapi.yaml","api-reference/gpt-image-2-vip-generate-openapi-en.yaml","api-reference/gpt-image-2-vip-edit-openapi-en.yaml","api-reference/gpt-image-2-vip-chat-openapi-en.yaml"],"playground":{"display":"interactive","proxy":true},"examples":{"defaults":"required"}},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"首页"},{"href":"https://imagen.apiyi.com","label":"AI出图"},{"href":"https://icover.ai","label":"AI视频"}],"primary":{"type":"button","label":"控制台","href":"https://api.apiyi.com/account/profile"}},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI 集成","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI 开发者套件(中文)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"用户口碑 / Wall of Love","items":[{"label":"用户口碑(中文)","href":"/wall-of-love"},{"label":"Wall of Love (EN)","href":"/en/wall-of-love"}]}]},"seo":{"indexing":"all"},"icons":{"library":"lucide"},"banner":{"content":"🚀 **gemini-4-argon 和 Nano Banana 2.1 均已上线 | Now Live**:[详情 Details](https://docs.apiyi.com/changelog)","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","aistudio"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"global":{"anchors":[]},"languages":[{"language":"zh","href":""},{"language":"en","navbar":{"links":[{"href":"https://api.apiyi.com","label":"Home"},{"href":"https://imagen.apiyi.com","label":"AI Image"},{"href":"https://icover.ai","label":"AI Video"}],"primary":{"type":"button","label":"Console","href":"https://api.apiyi.com/account/profile"}},"href":"en"},{"language":"zh-Hant","banner":{"content":"本頁由程式自動轉換為繁體中文,用詞以台灣正體為準;如有歧義請以[簡體中文版](/)為準。","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI 整合","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI 開發者套件(中文)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"使用者口碑 / Wall of Love","items":[{"label":"使用者口碑(中文)","href":"/wall-of-love"},{"label":"Wall of Love (EN)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"首頁"},{"href":"https://imagen.apiyi.com","label":"AI出圖"},{"href":"https://icover.ai","label":"AI影片"}],"primary":{"type":"button","label":"控制台","href":"https://api.apiyi.com/account/profile"}},"href":"zh-Hant"},{"language":"ja","banner":{"content":"このページは AI により翻訳されています。内容に相違がある場合は[English 版](/en)を正としてください。","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI統合","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI開発者キット(中国語)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"ユーザーの声 / Wall of Love","items":[{"label":"ユーザーの声(中国語)","href":"/wall-of-love"},{"label":"Wall of Love(英語)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"ホーム"},{"href":"https://imagen.apiyi.com","label":"AI画像生成"},{"href":"https://icover.ai","label":"AI動画生成"}],"primary":{"type":"button","label":"コンソール","href":"https://api.apiyi.com/account/profile"}},"href":"ja"},{"language":"ko","banner":{"content":"이 페이지는 AI로 번역되었습니다. 내용이 다를 경우 [English 버전](/en)을 기준으로 하십시오.","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI 통합","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI 개발자 키트(중국어)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"사용자 후기 / Wall of Love","items":[{"label":"사용자 후기(중국어)","href":"/wall-of-love"},{"label":"Wall of Love (영문)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"홈"},{"href":"https://imagen.apiyi.com","label":"AI 이미지 생성"},{"href":"https://icover.ai","label":"AI 동영상 생성"}],"primary":{"type":"button","label":"콘솔","href":"https://api.apiyi.com/account/profile"}},"href":"ko"},{"language":"ru","banner":{"content":"Эта страница переведена с помощью ИИ. При расхождениях ориентируйтесь на [английскую версию](/en).","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI-интеграция","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"Набор AI-разработчика (кит.)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"Отзывы пользователей / Wall of Love","items":[{"label":"Отзывы пользователей (на китайском)","href":"/wall-of-love"},{"label":"Wall of Love (EN)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"Главная"},{"href":"https://imagen.apiyi.com","label":"Генерация изображений"},{"href":"https://icover.ai","label":"Генерация видео"}],"primary":{"type":"button","label":"Консоль","href":"https://api.apiyi.com/account/profile"}},"href":"ru"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"apiyillc","hasAudioNarration":false,"actualSubdomain":"apiyillc","customDomains":["docs.apiyi.com"],"gitSource":{"type":"github","owner":"pdmaker","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adcf12aae25711913674511","collectionId":"496a1b3e-4ec8-48e5-baca-bbcb75e23eba","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adcf12aae25711913674511"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6adcf12aae25711913674511","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"zh","tag":"首页","count":213},{"language":"en","tag":"Home","count":213},{"language":"ja","tag":"ホーム","count":213},{"language":"ko","tag":"홈","count":213},{"language":"ru","tag":"Главная","count":213},{"language":"zh-Hant","tag":"首頁","count":213},{"language":"zh","tag":"图片 API(官转)","count":80},{"language":"en","tag":"Image API (Official)","count":80},{"language":"ja","tag":"画像API(公式)","count":80},{"language":"ko","tag":"이미지 API (공식)","count":80},{"language":"ru","tag":"Image API (официальный)","count":80},{"language":"zh-Hant","tag":"圖片 API(官轉)","count":80},{"language":"zh","tag":"公告","count":75},{"language":"en","tag":"Announcements","count":75},{"language":"zh","tag":"AI风向标","count":72},{"language":"en","tag":"AI Radar","count":72},{"language":"zh","tag":"常见问题","count":63},{"language":"en","tag":"FAQ","count":63},{"language":"ja","tag":"FAQ","count":63},{"language":"ko","tag":"FAQ","count":63},{"language":"ru","tag":"FAQ","count":63},{"language":"zh-Hant","tag":"常見問題","count":63},{"language":"zh","tag":"使用场景","count":49},{"language":"en","tag":"Use Cases","count":49},{"language":"ja","tag":"活用例","count":49},{"language":"ko","tag":"활용 사례","count":49},{"language":"ru","tag":"Сценарии использования","count":49},{"language":"zh-Hant","tag":"使用場景","count":49},{"language":"zh","tag":"基础 API","count":47},{"language":"en","tag":"Basic API","count":47},{"language":"ja","tag":"基本API","count":47},{"language":"ko","tag":"기본 API","count":47},{"language":"ru","tag":"Базовый API","count":47},{"language":"zh-Hant","tag":"基礎 API","count":47},{"language":"zh","tag":"视频 API(官转)","count":38},{"language":"en","tag":"Video API (Official)","count":38},{"language":"ja","tag":"動画API(公式)","count":38},{"language":"ko","tag":"동영상 API (공식)","count":38},{"language":"ru","tag":"Video API (официальный)","count":38},{"language":"zh-Hant","tag":"影片 API(官轉)","count":38},{"language":"zh","tag":"模型价格","count":35},{"language":"en","tag":"Model Pricing","count":35},{"language":"ja","tag":"モデル料金","count":35},{"language":"ko","tag":"모델 요금","count":35},{"language":"ru","tag":"Цены на модели","count":35},{"language":"zh-Hant","tag":"模型價格","count":35},{"language":"zh","tag":"文本生成","count":27},{"language":"en","tag":"Text Generation","count":27},{"language":"ja","tag":"テキスト生成","count":27},{"language":"ko","tag":"텍스트 생성","count":27},{"language":"ru","tag":"Генерация текста","count":27},{"language":"zh-Hant","tag":"文本生成","count":27},{"language":"ja","tag":"課金とセキュリティ","count":17},{"language":"ko","tag":"결제 및 보안","count":17},{"language":"ru","tag":"Оплата и безопасность","count":17},{"language":"zh-Hant","tag":"充值與安全","count":17},{"language":"ja","tag":"NanoBananaベストプラクティス","count":15},{"language":"ko","tag":"NanoBanana 모범 사례","count":15},{"language":"ru","tag":"Лучшие практики NanoBanana","count":15},{"language":"zh-Hant","tag":"NanoBanana最佳實踐","count":15}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"models/models.css","content":".mp-layout{display:flex;gap:2.5rem;max-width:1400px;margin:0 auto;padding:2.5rem 1.5rem 4rem;font-size:15px;line-height:1.7;color:rgb(var(--gray-500, 113 115 119))}html.dark .mp-layout{color:rgb(var(--gray-400, 159 161 165))}.mp-rail{display:none}@media (min-width:1024px){.mp-rail{display:block;width:13rem;flex-shrink:0}}.mp-rail-nav{position:sticky;top:9.25rem;font-size:.875rem}.mp-rail-head{font-weight:600;margin:0 0 .375rem;color:rgb(var(--gray-900, 23 25 29))}html.dark .mp-rail-head{color:rgb(var(--gray-200, 223 225 229))}.mp-rail-link{display:block;padding:.22rem 0;color:rgb(var(--gray-500, 113 115 119));text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mp-content a,.mp-content code.mp-ep-rec,.mp-rail-link:hover{color:rgb(var(--primary, 37 99 235))}html.dark .mp-rail-link{color:rgb(var(--gray-400, 159 161 165))}html.dark .mp-content a,html.dark .mp-content code.mp-ep-rec,html.dark .mp-rail-link:hover{color:rgb(var(--primary-light, 59 130 246))}.mp-rail-vendors{max-height:45vh;overflow-y:auto}.mp-mt{margin-top:1rem}.mp-content{min-width:0;flex:1}.mp-content h2,.mp-title{color:rgb(var(--gray-900, 23 25 29))}.mp-title{font-size:2rem;font-weight:700;letter-spacing:-.02em;margin:0 0 .5rem}html.dark .mp-content strong,html.dark .mp-title{color:#fff}.mp-desc{color:rgb(var(--gray-500, 113 115 119));margin:0 0 1.5rem}html.dark .mp-content th,html.dark .mp-desc{color:rgb(var(--gray-400, 159 161 165))}.mp-content h2{font-size:1.375rem;font-weight:600;margin:2.75rem 0 1rem;padding-bottom:.45rem;border-bottom:1px solid rgb(var(--gray-200, 223 225 229)/.7);scroll-margin-top:12rem}@media (min-width:1024px){.mp-content h2{scroll-margin-top:16.5rem}}html.dark .mp-content h2{border-color:rgb(255 255 255/.1);color:#fff}.mp-content p,.mp-content ul{margin:.75rem 0}.mp-content ul{padding-left:1.4rem}.mp-content li{margin:.4rem 0}.mp-content strong{color:rgb(var(--gray-900, 23 25 29))}.mp-content a{text-decoration:none}.mp-content a:hover{text-decoration:underline}.mp-content code{font-size:.85em;background:rgb(var(--gray-100, 239 241 245)/.8);border:1px solid rgb(var(--gray-200, 223 225 229)/.7);padding:.1em .35em;border-radius:.375rem}html.dark .mp-content code{background:rgb(255 255 255/.06);border-color:rgb(255 255 255/.1)}.mp-content code.mp-ep-rec{background:rgb(var(--primary, 37 99 235)/.08);border-color:rgb(var(--primary, 37 99 235)/.45);font-weight:600}html.dark .mp-content code.mp-ep-rec{background:rgb(var(--primary-light, 59 130 246)/.14);border-color:rgb(var(--primary-light, 59 130 246)/.5)}.mp-content table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:.875rem;margin:1rem 0 1.5rem}.mp-content td,.mp-content th{padding:.55rem 1.25rem .55rem 0;white-space:nowrap}.mp-content th{text-align:left;font-weight:500;color:rgb(var(--gray-500, 113 115 119));border-bottom:1px solid rgb(var(--gray-200, 223 225 229)/.7)}.mp-content td{border-bottom:1px solid rgb(var(--gray-200, 223 225 229)/.45)}html.dark .mp-content th{border-color:rgb(255 255 255/.1)}html.dark .mp-content td{border-color:rgb(255 255 255/.07)}.mp-search{display:contents}.mp-search-bar{position:sticky;top:5rem;z-index:20;margin:0 0 1.75rem;background:rgb(var(--background-light, 255 255 255));padding:.75rem 0 .85rem;box-shadow:0 10px 14px -10px rgb(var(--gray-950, 11 13 17)/.28)}@media (min-width:1024px){.mp-search-bar{top:9.25rem}}html.dark .mp-search-bar{background:rgb(var(--background-dark, 10 11 16));box-shadow:0 8px 12px -10px rgb(0 0 0/.7)}.mp-search-label{margin:0 0 .5rem;padding-left:.6rem;border-left:3px solid rgb(var(--primary, 37 99 235));font-size:.9rem;font-weight:600;line-height:1.4;color:rgb(var(--primary, 37 99 235))}html.dark .mp-search-label{border-left-color:rgb(var(--primary-light, 59 130 246));color:rgb(var(--primary-light, 59 130 246))}.mp-search-input{width:100%;box-sizing:border-box;border:1px solid rgb(var(--gray-400, 159 161 165)/.3);border-radius:.75rem;padding:.7rem 1rem .7rem 2.65rem;font-size:.9rem;background-color:rgb(var(--background-light, 255 255 255));background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717377' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:.9rem center;color:rgb(var(--gray-900, 23 25 29));outline:0;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.mp-search-input::placeholder{color:rgb(var(--gray-500, 113 115 119))}.mp-search-input:hover{border-color:rgb(var(--gray-600, 81 83 87)/.3)}.mp-search-input:focus{border-color:rgb(var(--primary, 37 99 235));box-shadow:0 0 0 3px rgb(var(--primary, 37 99 235)/.16)}html.dark .mp-search-input{background-color:rgb(var(--background-dark, 10 11 16));background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239fa1a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E\");border-color:rgb(var(--gray-600, 81 83 87)/.3);color:rgb(var(--gray-100, 239 241 245))}html.dark .mp-search-input::placeholder{color:rgb(255 255 255/.5)}html.dark .mp-search-input:hover{border-color:rgb(var(--gray-500, 113 115 119)/.35)}html.dark .mp-search-input:focus{border-color:rgb(var(--primary-light, 59 130 246));box-shadow:0 0 0 3px rgb(var(--primary-light, 59 130 246)/.22)}.mp-search-empty,.mp-search-meta{color:rgb(var(--gray-500, 113 115 119))}.mp-search-meta{font-size:.75rem;margin:.75rem 0 .25rem}.mp-search-empty{font-size:.875rem;margin-top:.75rem}html.dark .mp-search-empty,html.dark .mp-search-meta{color:rgb(var(--gray-400, 159 161 165))}.mp-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8125rem}@media (min-width:1024px){.mp-jump{display:none}}"},{"filePath":"styles/agent-prompt.css","content":"div.prompt{border:1.5px solid rgb(var(--primary, 37 99 235)/.35);background:rgb(var(--primary, 37 99 235)/.035);padding:1.25rem 1.25rem 1rem;row-gap:.75rem}html.dark div.prompt{border-color:rgb(var(--primary-light, 59 130 246)/.4);background:rgb(var(--primary-light, 59 130 246)/.06)}div.prompt [data-component-part=prompt-content-wrapper]{width:100%}div.prompt [data-component-part=prompt-actions-wrapper]{width:100%;justify-content:flex-end}div.prompt [data-component-part=prompt-description]{flex:1;font-size:14px;line-height:1.65}div.prompt [data-component-part=prompt-description]>div>*{margin:0}div.prompt [data-component-part=prompt-description]>div>*+*{margin-top:.6rem}div.prompt [data-component-part=prompt-description] strong{font-size:15px;font-weight:650;color:rgb(var(--gray-900, 23 25 29))}html.dark div.prompt [data-component-part=prompt-description] strong{color:#fff}div.prompt [data-component-part=prompt-description]>div>*+p{color:rgb(var(--gray-600, 80 82 86))}html.dark div.prompt [data-component-part=prompt-description]>div>*+p{color:rgb(var(--gray-400, 159 161 165))}div.prompt [data-component-part=prompt-description] code{font-size:.85em;background:rgb(var(--gray-100, 239 241 245)/.9);border:1px solid rgb(var(--gray-200, 223 225 229)/.7);padding:.05em .35em;border-radius:.375rem}html.dark div.prompt [data-component-part=prompt-description] code{background:rgb(255 255 255/.06);border-color:rgb(255 255 255/.1)}div.prompt [data-component-part=prompt-description] blockquote{margin:0;padding:.75rem .9rem;font-style:normal;border:1px dashed rgb(var(--gray-300, 191 193 197));border-radius:.6rem;background:rgb(var(--background-light, 255 255 255));font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.6;color:rgb(var(--gray-600, 80 82 86));overflow-wrap:anywhere;-webkit-mask-image:linear-gradient(to bottom,#000 70%,transparent 100%);mask-image:linear-gradient(to bottom,#000 70%,transparent 100%)}div.prompt [data-component-part=prompt-description] blockquote ol,div.prompt [data-component-part=prompt-description] blockquote p{margin:0}div.prompt [data-component-part=prompt-description] blockquote li{padding:0}div.prompt [data-component-part=prompt-description] blockquote>*+*{margin-top:.5rem}div.prompt [data-component-part=prompt-description] blockquote code{background:0 0;border:0;padding:0;font-size:1em}div.prompt [data-component-part=prompt-description] blockquote a{color:inherit;text-decoration:none;pointer-events:none}html.dark div.prompt [data-component-part=prompt-description] blockquote{border-color:rgb(255 255 255/.15);background:rgb(var(--background-dark, 13 13 13));color:rgb(var(--gray-400, 159 161 165))}div.prompt [data-component-part=prompt-action-copy-button]{padding:.6rem 1.25rem;font-size:14px;line-height:20px;font-weight:600;border-radius:.65rem;gap:.45rem;box-shadow:0 1px 2px rgb(0 0 0/.08),0 4px 12px rgb(var(--primary, 37 99 235)/.25)}div.prompt [data-component-part=prompt-action-copy-button]::before{content:\"\";width:16px;height:16px;flex-shrink:0;background:currentColor;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E\") center/contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E\") center/contain no-repeat}div.prompt [data-component-part=prompt-action-copy-button] svg{width:12px;height:12px}@media (max-width:640px){div.prompt [data-component-part=prompt-actions-wrapper]>*{flex:1}}"}],"page":{"pagePath":"en/faq/timeout-configuration","slug":"/en/faq/timeout-configuration","pageMetadata":{"title":"How do I avoid API timeouts?","description":"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts","icon":"timer","href":"/en/faq/timeout-configuration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Heading,Info,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`short-answer`,children:`Short Answer`}),`\n`,_jsxs(Info,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Three golden rules that cover 90% of timeout problems:`})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Set a 360-second timeout for synchronous image endpoints.`}),` Image generation has no async task ID — disconnecting early means you are still billed but get no image.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Give reasoning models enough time.`}),` `,_jsx(_components.code,{children:`gemini-3.1-pro-preview`}),`, `,_jsx(_components.code,{children:`gpt-5.6-sol`}),`, and `,_jsx(_components.code,{children:`gpt-5.5-pro`}),` can take several minutes, whether you stream or not.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Never run long requests through the CDN node.`}),` `,_jsx(_components.code,{children:`api-cf.apiyi.com`}),` sits behind Cloudflare and returns `,_jsx(_components.code,{children:`524`}),` past roughly 100 seconds; it only suits fast text calls.`]}),`\n`]}),_jsxs(_components.p,{children:[`Separately: if a specific model keeps returning `,_jsx(_components.code,{children:`429`}),` (insufficient concurrency), contact support to review your quota.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`timeout-cheat-sheet`,children:`Timeout cheat sheet`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scenario`}),_jsx(_components.th,{children:`Recommended timeout`}),_jsx(_components.th,{children:`Recommended node`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Regular text chat (non-reasoning)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`60-120s`}),_jsx(_components.td,{children:`Any node`}),_jsx(_components.td,{children:`Usually returns in seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Reasoning models (thinking / reasoning)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`300-600s`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api.apiyi.com`}),` / `,_jsx(_components.code,{children:`b.apiyi.com`})]}),_jsx(_components.td,{children:`Slow whether streaming or not`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Long text output (10k+ words)`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`300s or more`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api.apiyi.com`}),` / `,_jsx(_components.code,{children:`b.apiyi.com`})]}),_jsx(_components.td,{children:`❌ Not the CDN node`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image generation / editing`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`360s baseline`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api.apiyi.com`}),` / `,_jsx(_components.code,{children:`b.apiyi.com`})]}),_jsx(_components.td,{children:`❌ Not the CDN node`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`4K images, multi-image reference`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`600s`})}),_jsx(_components.td,{children:`Same as above`}),_jsx(_components.td,{children:`See image best practices`})]})]})]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`A timed-out request is still billed`})}),_jsxs(_components.p,{children:[`After your client disconnects, the server and upstream provider `,_jsx(_components.strong,{children:`still finish the job`}),`, and the request `,_jsx(_components.strong,{children:`is billed as usual`}),`.`]}),_jsxs(_components.p,{children:[`In other words: `,_jsx(_components.strong,{children:`a timeout set too low means you paid and got nothing`}),`. Set it to a safe upper bound once rather than letting a nearly-successful request get cut off by your own client.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`the-four-keys-in-detail`,children:`The four keys in detail`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`① Synchronous image endpoints: set the timeout to 360 seconds`,id:`1-synchronous-image-endpoints-set-the-timeout-to-360-seconds`,children:[_jsxs(_components.p,{children:[`All APIYI image models are `,_jsx(_components.strong,{children:`synchronous`}),`: you send the request, hold the connection, and the result comes back in the response body. There is no async task ID and no polling endpoint — disconnect and the result is gone.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Why defaults hurt you`}),`: mainstream HTTP clients default to 30-60 seconds, while image generation is a genuinely long request:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`GPT-Image-2 at `,_jsx(_components.code,{children:`high`}),` quality with 2K/4K takes 3-5 minutes in practice`]}),`\n`,_jsx(_components.li,{children:`Nano Banana 4K generation starts around 50 seconds and runs longer at peak`}),`\n`,_jsx(_components.li,{children:`Multi-image reference tasks often exceed 5 minutes`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation`}),`: when unsure about a model’s latency, use `,_jsx(_components.strong,{children:`360 seconds`}),` as a baseline; give heavy tasks like 4K and multi-image reference `,_jsx(_components.strong,{children:`600 seconds`}),`. Per-model values are in `,_jsx(_components.a,{href:`/en/api-capabilities/image-api-best-practices`,children:`Image API best practices`}),`.`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`Occasionally a log shows the image finished in 30 seconds while the client waited 5 minutes — because the log’s duration only runs to the point where the gateway finishes processing, while you wait for the body to finish arriving and for the connection’s finish signal. `,_jsx(_components.strong,{children:`Raising the timeout does not always help`}),`: it does for the slow-download class, but not when the data is already complete and only the finish signal is missing. Measure once following `,_jsx(_components.a,{href:`/en/faq/log-duration-vs-client-wait`,children:`The log says it finished but my client got nothing`}),`, then decide.`]})})]}),_jsxs(Accordion,{title:`② Reasoning / long-output models: non-streaming can't hold, use streaming`,id:`2-reasoning-long-output-models-non-streaming-cant-hold-use-streaming`,children:[_jsxs(_components.p,{children:[`Regular text models return in seconds, which makes it easy to assume text calls never need timeout tuning. `,_jsx(_components.strong,{children:`Reasoning models — and any workload that produces tens of thousands of characters in one call — are the exception:`})]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gemini-3.1-pro-preview`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gpt-5.6-sol`})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`gpt-5.5-pro`}),` (pricier and slower)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`claude-opus-5`}),` and other models running deep thinking / high effort`]}),`\n`,_jsx(_components.li,{children:`Long-output tasks: drama scripts, fiction, long translations, large code generation`}),`\n`]}),_jsxs(_components.p,{children:[`These calls reason for a long time, then emit a long body token by token, and `,_jsx(_components.strong,{children:`ten-plus minutes of total latency is normal`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key point: non-streaming can’t hold, but streaming with a sensible read timeout solves it.`}),` Non-streaming buffers the whole generation and sends it at once, so your read timeout has to race the entire generation and any hiccup breaks it. With streaming the first byte arrives within seconds, and after that a data event arrives every few tens of seconds (measured max silent gap during thinking ~42s, with keepalive pings in between), so your read timeout only has to cover the `,_jsx(_components.em,{children:`inter-event gap`}),`, not the total time.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Prefer streaming for long output`}),` (`,_jsx(_components.code,{children:`stream=True`}),`), with a read timeout of `,_jsx(_components.strong,{children:`90-120 seconds`}),` sized to the inter-event gap — not one huge value covering the whole generation.`]}),`\n`,_jsxs(_components.li,{children:[`If you insist on non-streaming, set the timeout to `,_jsx(_components.strong,{children:`300-600 seconds`}),` and accept the instability; the longer it runs the more likely you disconnect before the result arrives.`]}),`\n`,_jsxs(_components.li,{children:[`Match your thinking tier (`,_jsx(_components.code,{children:`reasoning_effort`}),` / `,_jsx(_components.code,{children:`thinking`}),`) to the time you have allowed — a higher tier needs more headroom.`]}),`\n`]}),_jsxs(_components.p,{children:[`For the full long-output recipe (streaming code, max_tokens, stop_reason, retries) see `,_jsx(_components.a,{href:`/en/api-capabilities/long-form-output-practices`,children:`Long-form Output Practices`}),`.`]})]}),_jsxs(Accordion,{title:`③ Base URL selection: the CDN node cannot carry long requests`,id:`3-base-url-selection-the-cdn-node-cannot-carry-long-requests`,children:[_jsxs(_components.p,{children:[`APIYI’s `,_jsx(_components.code,{children:`api-cf.apiyi.com`}),` is fronted by the `,_jsx(_components.strong,{children:`Cloudflare global CDN`}),`. It offers worldwide acceleration and low latency from overseas, but it has a `,_jsx(_components.strong,{children:`request timeout of roughly 100 seconds`}),`, past which you get a `,_jsx(_components.code,{children:`524`}),` error.`]}),_jsxs(_components.p,{children:[`⚠️ `,_jsx(_components.strong,{children:`This affects more than image endpoints.`}),` Any call that might exceed 100 seconds is a poor fit, including:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`❌ Image generation / editing`}),`\n`,_jsx(_components.li,{children:`❌ Video generation`}),`\n`,_jsx(_components.li,{children:`❌ Long text output (long articles, large translations, big code generations)`}),`\n`,_jsx(_components.li,{children:`❌ Deep-thinking tasks on reasoning models`}),`\n`]}),_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`Good fit`}),`: regular chat and short generations that finish within 100 seconds.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation`}),`: for long requests use `,_jsx(_components.code,{children:`api.apiyi.com`}),` (or the backup `,_jsx(_components.code,{children:`b.apiyi.com`}),`). Full node comparison in the `,_jsx(_components.a,{href:`/en/faq/base-url-config`,children:`Base URL guide`}),`.`]})]}),_jsxs(Accordion,{title:`④ Hitting 429 concurrency limits: contact support`,id:`4-hitting-429-concurrency-limits-contact-support`,children:[_jsxs(_components.p,{children:[`If timeouts come alongside frequent `,_jsx(_components.code,{children:`429 Too Many Requests`}),`, the problem is usually `,_jsx(_components.strong,{children:`concurrency quota`}),`, not your timeout.`]}),_jsxs(_components.p,{children:[`Concurrency limits apply `,_jsx(_components.strong,{children:`per model`}),`, not across your whole account. A specific model — especially a newly launched or supply-constrained one — may have a lower quota.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What to do:`})}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Implement exponential backoff so you do not saturate the limit in bursts`}),`\n`,_jsxs(_components.li,{children:[`If 429s persist, `,_jsx(_components.strong,{children:`contact APIYI support`}),` — we can check that model’s actual quota and help adjust it`]}),`\n`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/en/faq/api-concurrency`,children:`How much concurrency can I use?`}),` for the rules.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code examples`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Python`,id:`python`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.apiyi.com/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# not the api-cf node for long requests`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Tier your timeouts by scenario (seconds) instead of one global value`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TIMEOUTS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# regular text`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reasoning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# reasoning models`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`360`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# image generation baseline`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image_4k\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 4K / multi-image reference`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-5.6-sol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Analyze the complexity of this code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`TIMEOUTS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reasoning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 600s for reasoning models`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(resp.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Node.js`,id:`node-js`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"openai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`APIYI_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.apiyi.com/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` timeout:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 600`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// milliseconds — 600s for reasoning models`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// avoid auto-retry on long requests: it double-bills`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` resp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gemini-3.1-pro-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Write an 8000-word technical analysis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})}),_jsx(Tab,{title:`cURL`,id:`curl`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# --max-time caps the total request duration in seconds`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.apiyi.com/v1/images/generations`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --max-time`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 360`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-image-2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"a serene mountain lake at sunrise\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"2048x2048\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Be careful with auto-retry on long requests`}),`: many SDKs retry twice by default. If an image or reasoning task times out and retries, you can end up billed three times with nothing to show. Set `,_jsx(_components.code,{children:`max_retries`}),` to 0 and control retries in your own application logic.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`still-timing-out-after-raising-the-timeout-check-every-hop`,children:`Still timing out after raising the timeout? Check every hop`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Step 1: Confirm the SDK timeout actually applies`,children:_jsx(_components.p,{children:`Some frameworks wrap another timeout around the HTTP client. Print the effective configuration and confirm the parameter you changed is the one being used.`})}),_jsxs(Step,{title:`Step 2: Check every hop in the path`,children:[_jsx(_components.p,{children:`Any layer with a timeout shorter than the generation time will disconnect before your client does:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Self-hosted reverse proxy: Nginx `,_jsx(_components.code,{children:`proxy_read_timeout`}),` (60s by default)`]}),`\n`,_jsx(_components.li,{children:`Cloud load balancer: idle connection timeout`}),`\n`,_jsx(_components.li,{children:`API gateway / CDN: origin timeout`}),`\n`,_jsx(_components.li,{children:`Serverless functions: execution limit (often 30-60s by default)`}),`\n`,_jsx(_components.li,{children:`Task queue workers: per-task timeout`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Every hop must be widened`}),` — changing only the client does nothing.`]})]}),_jsxs(Step,{title:`Step 3: Confirm you are not on the CDN node`,children:[_jsxs(_components.p,{children:[`Check whether your Base URL is `,_jsx(_components.code,{children:`api-cf.apiyi.com`}),`. For long requests, switch to `,_jsx(_components.code,{children:`api.apiyi.com`}),` or `,_jsx(_components.code,{children:`b.apiyi.com`}),`.`]}),_jsxs(_components.p,{children:[`Rule of thumb: a `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`524`})}),` almost always means a Cloudflare-layer timeout, not a slow model.`]})]}),_jsx(Step,{title:`Step 4: Distinguish timeouts from concurrency limits`,children:_jsxs(_components.p,{children:[`Read the status code: `,_jsx(_components.code,{children:`524`}),` and dropped connections are timeout problems; `,_jsx(_components.code,{children:`429`}),` is a quota problem. The fixes are entirely different.`]})}),_jsx(Step,{title:`Step 5: Check call logs for actual latency`,children:_jsxs(_components.p,{children:[`Look up the request’s real duration and billing in the console `,_jsx(_components.a,{href:`/en/faq/call-logs`,children:`call logs`}),`, then derive a sensible timeout from it.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`common-questions`,children:`Common questions`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`My image timeout is 200 seconds and usually enough. Why does it still time out sometimes?`,id:`my-image-timeout-is-200-seconds-and-usually-enough-why-does-it-still-time-out-sometimes`,children:[_jsxs(_components.p,{children:[`Most images finish in a few dozen seconds, so 200 seconds looks generous. But providers queue requests at peak times, and a single generation can occasionally stretch to several minutes. When that happens, the gateway automatically retries on another route in the background, `,_jsx(_components.strong,{children:`as long as your client is still waiting`}),`.`]}),_jsxs(_components.p,{children:[`If your timeout is too tight, your side closes the connection before the gateway can switch routes, and the request simply fails. So for images, set the timeout to `,_jsx(_components.strong,{children:`360 seconds, or 600 seconds for 4K or multiple reference images`}),` (see the table above), to leave room for the automatic switch.`]}),_jsxs(_components.p,{children:[`Also, `,_jsx(_components.strong,{children:`larger reference images are slower`}),`: an edit request with an 8-10MB body spends part of the time just uploading, and the provider takes longer to process it. Where your use case allows, compress reference images to 2048 pixels on the long side and under 2MB each. This is noticeably faster with almost no effect on quality; see `,_jsx(_components.a,{href:`/en/api-capabilities/image-compression-resolution`,children:`Image Compression and Resolution`}),`.`]})]}),_jsxs(Accordion,{title:`Can I get a refund for a request that timed out?`,id:`can-i-get-a-refund-for-a-request-that-timed-out`,children:[_jsx(_components.p,{children:`No. Once your client disconnects, the server and upstream still complete the job, so the cost is genuinely incurred.`}),_jsxs(_components.p,{children:[`The right approach is to `,_jsx(_components.strong,{children:`set the timeout to a safe upper bound in one go`}),`, rather than using a small value and relying on retries — retries only multiply the bill.`]})]}),_jsxs(Accordion,{title:`Can you offer an async endpoint so I can fetch results by ID after a disconnect?`,id:`can-you-offer-an-async-endpoint-so-i-can-fetch-results-by-id-after-a-disconnect`,children:[_jsxs(_components.p,{children:[`Image endpoints currently run in `,_jsx(_components.strong,{children:`synchronous pass-through mode`}),`, and we do not store customer business data, so “retrieve by ID after disconnect” is not available.`]}),_jsxs(_components.p,{children:[`Recommended pattern: synchronous call + generous timeout + your own task-state table. That is effectively a lightweight async queue. See `,_jsx(_components.a,{href:`/en/faq/image-async-api`,children:`Are image endpoints synchronous or asynchronous?`})]}),_jsx(_components.p,{children:`Video models are natively async and are not affected by this.`})]}),_jsxs(Accordion,{title:`Does streaming prevent timeouts?`,id:`does-streaming-prevent-timeouts`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Partly — but do not rely on it.`})}),_jsx(_components.p,{children:`Streaming does deliver the first token sooner, which reduces the risk of a total no-response. But a reasoning model may emit nothing during the thinking phase, so the read timeout still fires, and the full output takes just as long overall.`}),_jsxs(_components.p,{children:[`The correct approach is streaming `,_jsx(_components.strong,{children:`plus`}),` a generous timeout.`]})]}),_jsxs(Accordion,{title:`Is there a downside to setting a very large timeout?`,id:`is-there-a-downside-to-setting-a-very-large-timeout`,children:[_jsxs(_components.p,{children:[`No billing impact — `,_jsx(_components.strong,{children:`you are charged for tokens and calls consumed, not for how long you waited`}),`.`]}),_jsx(_components.p,{children:`The only concern is resource usage on your side: a long connection holds a worker or connection-pool slot. Under high concurrency, run image and reasoning requests through async IO or a dedicated long-task queue.`})]}),_jsx(Accordion,{title:`What is the difference between 524 and 429?`,id:`what-is-the-difference-between-524-and-429`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`524`})}),`: a Cloudflare-layer timeout, meaning you used `,_jsx(_components.code,{children:`api-cf.apiyi.com`}),` and the request exceeded roughly 100 seconds. Switch nodes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`429`})}),`: a concurrency or rate limit, unrelated to duration. Add exponential backoff, and contact support if it persists.`]}),`\n`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-documentation`,children:`Related Documentation`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Image API best practices`,icon:`image`,href:`/en/api-capabilities/image-api-best-practices`,children:_jsx(_components.p,{children:`Per-model timeout table and output format reference`})}),_jsx(Card,{title:`How do I set the Base URL?`,icon:`link`,href:`/en/faq/base-url-config`,children:_jsx(_components.p,{children:`Differences between the four nodes and how to choose`})}),_jsx(Card,{title:`Are image endpoints sync or async?`,icon:`refresh-cw`,href:`/en/faq/image-async-api`,children:_jsx(_components.p,{children:`Synchronous mode and client-side task management`})}),_jsx(Card,{title:`How much concurrency can I use?`,icon:`gauge`,href:`/en/faq/api-concurrency`,children:_jsx(_components.p,{children:`Concurrency limits by model type and quota requests`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`contact-us`,children:`Contact Us`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsxs(Card,{title:`WeCom Support`,icon:`message-circle`,href:`https://work.weixin.qq.com/kfid/kfc9adfd5810ece25ec`,children:[_jsx(OptimizedImage,{src:`https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=7286b96e94110e3a48798b649df1b45b`,alt:`WeCom support QR code`,style:{maxWidth:`180px`},\"data-og-width\":`400`,width:`400`,\"data-og-height\":`400`,height:`400`,\"data-path\":`images/wecom-qrcode.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=280\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=37f8c1cb514f2252974b0225711f263f 280w, https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=560\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=224b42faa8b818987759e096385d944a 560w, https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=840\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=6c9a6fee8593084959b823e559c18b3b 840w, https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=1100\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=fcd40e4d1b490ea90b14cd1194fa2b0b 1100w, https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=1650\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=93f1dcacac0021a85d0cb8e9bcd63cf7 1650w, https://mintcdn.com/apiyillc/fpi567ydpk7adDt0/images/wecom-qrcode.png?w=2500\u0026fit=max\u0026auto=format\u0026n=fpi567ydpk7adDt0\u0026q=85\u0026s=7f1d84e27db0d7a4a90be98428c14f1b 2500w`}),_jsxs(_components.p,{children:[`Scan the QR code or `,_jsx(_components.a,{href:`https://work.weixin.qq.com/kfid/kfc9adfd5810ece25ec`,children:`click to contact support`})]}),_jsx(_components.p,{children:`Timeout troubleshooting and concurrency quota requests`})]}),_jsxs(Card,{title:`Email`,icon:`mail`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Support`}),`: `,_jsx(_components.a,{href:`mailto:[email protected]`,children:`[email protected]`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Business`}),`: `,_jsx(_components.a,{href:`mailto:[email protected]`,children:`[email protected]`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How do I avoid API timeouts?","description":"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts","icon":"timer","href":"/en/faq/timeout-configuration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Short Answer","slug":"short-answer","depth":2,"children":[]},{"title":"Timeout cheat sheet","slug":"timeout-cheat-sheet","depth":2,"children":[]},{"title":"The four keys in detail","slug":"the-four-keys-in-detail","depth":2,"children":[]},{"title":"Code examples","slug":"code-examples","depth":2,"children":[]},{"title":"Still timing out after raising the timeout? Check every hop","slug":"still-timing-out-after-raising-the-timeout-check-every-hop","depth":2,"children":[]},{"title":"Common questions","slug":"common-questions","depth":2,"children":[]},{"title":"Related Documentation","slug":"related-documentation","depth":2,"children":[]},{"title":"Contact Us","slug":"contact-us","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"apiyillc","siteName":"API易文档中心","title":"How do I avoid API timeouts? - API易文档中心","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh":{"href":"/faq/timeout-configuration","matchLevel":1},"en":{"href":"/en/faq/timeout-configuration","matchLevel":0},"zh-Hant":{"href":"/zh-Hant/faq/timeout-configuration","matchLevel":1},"ja":{"href":"/ja/faq/timeout-configuration","matchLevel":1},"ko":{"href":"/ko/faq/timeout-configuration","matchLevel":1},"ru":{"href":"/ru/faq/timeout-configuration","matchLevel":1}}},"lastModified":"2026-10-14T05:58:12.489Z","originalFileLocation":"en/faq/timeout-configuration.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\">\u003cmeta data-mint-head name=\"application-name\" content=\"API易文档中心\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How do I avoid API timeouts? - API易文档中心\">\u003cmeta data-mint-head property=\"og:description\" content=\"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"API易文档中心\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.apiyi.com/en/faq/timeout-configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://apiyillc.mintlify.app/_mintlify/api/og/v2?division=Network+%26+Connection\u0026amp;title=How+do+I+avoid+API+timeouts%3F\u0026amp;description=Client+timeout+settings%2C+how+slow+reasoning+models+really+are%2C+picking+the+right+Base+URL+node%2C+and+429+concurrency+checks+%E2%80%94+the+four+keys+to+avoiding+timeouts\u0026amp;theme=421dcf1ed22dd4b5d53fa3cb\u0026amp;signature=23f7aef43e05db3bf05bc054eaa5898937033061cbd1605bff0d14916e272535\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How do I avoid API timeouts? - API易文档中心\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://apiyillc.mintlify.app/_mintlify/api/og/v2?division=Network+%26+Connection\u0026amp;title=How+do+I+avoid+API+timeouts%3F\u0026amp;description=Client+timeout+settings%2C+how+slow+reasoning+models+really+are%2C+picking+the+right+Base+URL+node%2C+and+429+concurrency+checks+%E2%80%94+the+four+keys+to+avoiding+timeouts\u0026amp;theme=421dcf1ed22dd4b5d53fa3cb\u0026amp;signature=23f7aef43e05db3bf05bc054eaa5898937033061cbd1605bff0d14916e272535\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/apiyillc/sQlsuRwD6o27XLvg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"API易文档中心\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.apiyi.com/en/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/faq/timeout-configuration.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.apiyi.com/en/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.apiyi.com/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://docs.apiyi.com/zh-Hant/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.apiyi.com/ja/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.apiyi.com/ko/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.apiyi.com/ru/faq/timeout-configuration\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.apiyi.com/faq/timeout-configuration\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.apiyi.com/#organization\",\"name\":\"API易文档中心\",\"url\":\"https://docs.apiyi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/apiyillc/LjCT1O0GrSur6F2v/logo/light.svg?fit=max\u0026auto=format\u0026n=LjCT1O0GrSur6F2v\u0026q=85\u0026s=4119ef17a74cc54be127f34578d8b5fa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.apiyi.com#website\",\"name\":\"API易文档中心\",\"url\":\"https://docs.apiyi.com\",\"publisher\":{\"@id\":\"https://docs.apiyi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.apiyi.com/en/faq/timeout-configuration#webpage\",\"url\":\"https://docs.apiyi.com/en/faq/timeout-configuration\",\"name\":\"How do I avoid API timeouts?\",\"description\":\"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\",\"dateModified\":\"2026-10-14T05:58:12.489Z\",\"isPartOf\":{\"@id\":\"https://docs.apiyi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.apiyi.com/en/faq/timeout-configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.apiyi.com/en/faq/timeout-configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API易文档中心\",\"item\":\"https://docs.apiyi.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How do I avoid API timeouts?\",\"item\":\"https://docs.apiyi.com/en/faq/timeout-configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.apiyi.com/en/faq/timeout-configuration#article\",\"headline\":\"How do I avoid API timeouts?\",\"name\":\"How do I avoid API timeouts?\",\"description\":\"Client timeout settings, how slow reasoning models really are, picking the right Base URL node, and 429 concurrency checks — the four keys to avoiding timeouts\",\"url\":\"https://docs.apiyi.com/en/faq/timeout-configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.apiyi.com/en/faq/timeout-configuration#webpage\"},\"dateModified\":\"2026-10-14T05:58:12.489Z\",\"publisher\":{\"@id\":\"https://docs.apiyi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.apiyi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"API易文档中心\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"API易文档中心","nav":{"global":{"anchors":[]},"languages":[{"language":"zh","pages":[{"title":"zh","href":"/faq/timeout-configuration"}]},{"language":"en","navbar":{"links":[{"href":"https://api.apiyi.com","label":"Home"},{"href":"https://imagen.apiyi.com","label":"AI Image"},{"href":"https://icover.ai","label":"AI Video"}],"primary":{"type":"button","label":"Console","href":"https://api.apiyi.com/account/profile"}},"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":"/en"}]},{"tab":"Use Cases","icon":"layout-grid","pages":[{"title":"Use Cases","href":"/en/scenarios"}]},{"tab":"FAQ","icon":"circle-question-mark","groups":[{"group":"Overview","pages":[{"title":"FAQ Overview","sidebarTitle":"FAQ","icon":"circle-question-mark","href":"/en/faq"}]},{"group":"Site Features","icon":"compass","pages":[{"title":"Tokens \u0026 Groups","icon":"key","href":"/en/faq/token-and-groups"},{"title":"What is a Group? User Group vs Token Group Explained","icon":"layers","href":"/en/faq/groups-explained"},{"title":"How Do the Codex, ClaudeCode, and Default Groups Differ?","icon":"code","href":"/en/faq/codex-claudecode-default-groups"},{"title":"Is There One-Click Integration?","icon":"plug","href":"/en/faq/one-click-integration"}]},{"group":"Tokens \u0026 Logs","icon":"key","pages":[{"title":"The log says the call finished and was billed, but my client never received a response — how do I troubleshoot?","icon":"stethoscope","href":"/en/faq/log-duration-vs-client-wait"},{"title":"Why can't I use some models?","icon":"lock","href":"/en/faq/model-availability"},{"title":"What Is a Personal Access Token and How Do I Replace the System Token?","icon":"key-round","href":"/en/faq/personal-access-token"},{"title":"How to create a KEY?","icon":"key","href":"/en/faq/token-management"},{"title":"Do I Need to Set Available Models for Tokens?","icon":"list-check","href":"/en/faq/token-model-whitelist"},{"title":"How Do I Manage API Keys Securely?","icon":"shield-check","href":"/en/faq/key-security-management"},{"title":"What's the Difference Between Token Billing Modes?","icon":"calculator","href":"/en/faq/token-billing-modes"},{"title":"How to view my call records?","icon":"file-text","href":"/en/faq/call-logs"},{"title":"Where Can I Find the Request ID?","icon":"search","href":"/en/faq/request-id-troubleshooting"},{"title":"How do I read the billing amounts in the logs?","icon":"receipt","href":"/en/faq/log-billing-explained"},{"title":"How long are call logs kept, and when are they cleared?","icon":"clock","href":"/en/faq/log-retention-policy"},{"title":"What should I know about log timezone settings and data export?","icon":"globe","href":"/en/faq/log-timezone-and-export"},{"title":"Can I View Detailed Logs in the Backend for Troubleshooting?","icon":"toggle-right","href":"/en/faq/user-logs-control"},{"title":"How do I investigate unexpected API Key usage?","icon":"key","href":"/en/faq/troubleshoot-key-usage"}]},{"group":"Enterprise Services","icon":"building-2","pages":[{"title":"What Is the Enterprise Group? When Should You Use It?","icon":"building-2","href":"/en/faq/enterprise-group-vertex-fallback"},{"title":"Is There a Faster or Enterprise Route for Image Generation?","icon":"route","href":"/en/faq/image-generation-fast-enterprise-route"},{"title":"Is APIYI's Enterprise Service Trustworthy? Are the Models Authentic?","icon":"badge-check","href":"/en/faq/enterprise-trust"},{"title":"What's the difference between enterprise and individual users?","icon":"building-2","href":"/en/faq/enterprise-vs-individual"},{"title":"How do enterprise customers recharge?","icon":"landmark","href":"/en/faq/enterprise-recharge"},{"title":"How can university customers reimburse worry-free?","icon":"graduation-cap","href":"/en/faq/university-reimbursement"},{"title":"Does APIYI offer SLA guarantees?","icon":"shield-check","href":"/en/faq/sla-guarantee"},{"title":"Does an Agent Mini-Program Need Algorithm Filing?","icon":"file-check","href":"/en/faq/agent-miniapp-algorithm-filing"},{"title":"How Do I Handle Compliance for a China-Facing Product Using Overseas Models?","icon":"scale","href":"/en/faq/overseas-model-compliance"}]},{"group":"Billing \u0026 Security","icon":"shield","pages":[{"title":"What does the -c suffix in model names mean?","icon":"tag","href":"/en/faq/model-name-suffix-c"},{"title":"Prices Match the Official Rates — Why Buy from APIYI?","icon":"badge-percent","href":"/en/faq/official-pricing-advantages"},{"title":"How can APIYI price below the official rates?","icon":"trending-down","href":"/en/faq/why-cheaper-than-official"},{"title":"What Does the Model 'Multiplier' Mean?","icon":"calculator","href":"/en/faq/model-multiplier"},{"title":"How Much Computing Power Does 100 RMB Get?","icon":"calculator","href":"/en/faq/rmb-to-computing-power"},{"title":"What is the pre-deduction mechanism for API calls?","icon":"calculator","href":"/en/faq/pre-deduction-quota"},{"title":"Does APIYI Support Cache Billing?","icon":"database","href":"/en/faq/cache-billing"},{"title":"What Payment Methods Does APIYI Support?","icon":"credit-card","href":"/en/faq/payment-methods"},{"title":"What recharge promotions are available?","icon":"gift","href":"/en/faq/recharge-promotions"},{"title":"Does my APIYI balance expire? What is the validity period?","icon":"hourglass","href":"/en/faq/balance-validity-period"},{"title":"How to Set Up Balance Alerts?","icon":"bell","href":"/en/faq/balance-alerts"},{"title":"Why can't I run requests with remaining balance?","icon":"credit-card","href":"/en/faq/balance-insufficient"},{"title":"What if my invoice amount is less than $100?","icon":"receipt","href":"/en/faq/invoice-minimum-amount"},{"title":"I entered the wrong invoice details. Can the invoice be reissued?","icon":"receipt","href":"/en/faq/invoice-reissue"},{"title":"What Is APIYI's Refund Policy?","icon":"receipt","href":"/en/faq/refund-policy"},{"title":"How do I apply for an agent partnership? Can I earn rebates by inviting friends?","icon":"users","href":"/en/faq/referral-program"},{"title":"How is content safety and compliance ensured?","icon":"shield-check","href":"/en/faq/content-safety"},{"title":"How does APIYI ensure data security?","description":"Detailed explanation of APIYI data security protection measures, including encrypted transmission, minimized storage, and access control mechanisms","icon":"shield","href":"/en/faq/data-security"}]},{"group":"Network \u0026 Connection","icon":"wifi","pages":[{"title":"How do I avoid API timeouts?","icon":"timer","href":"/en/faq/timeout-configuration"},{"title":"Do I Need a Proxy to Use the API?","description":"Learn about APIYI's network access methods and whether proxy or VPN is required","icon":"wifi","href":"/en/faq/network-proxy"},{"title":"Python Raises SSLEOFError but curl Works?","icon":"shield-alert","href":"/en/faq/openssl-pq-handshake-eof"},{"title":"Where are APIYI's Servers? Which Server Should I Choose?","icon":"server","href":"/en/faq/server-location"},{"title":"CDN Image/Video Downloads Slow or Timing Out — What to Do?","icon":"gauge","href":"/en/faq/cdn-download-slow"},{"title":"Is http the Same as HTTP/1.1?","icon":"network","href":"/en/faq/http-vs-http11"},{"title":"How Can I Reduce Image API Latency?","icon":"gauge","href":"/en/faq/image-api-network-latency-optimization"},{"title":"Website or API Returns 502 — What Should I Do?","icon":"refresh-cw","href":"/en/faq/website-502-error"},{"title":"Script Gets 502 but Nothing in the Call Logs?","icon":"unplug","href":"/en/faq/proxy-empty-502"},{"title":"Image Calls Drop After About 90 Seconds Behind a Proxy?","icon":"unplug","href":"/en/faq/proxy-idle-timeout-disconnect"},{"title":"Image Request Hangs With No Result, but the Log Shows a Write Failure?","icon":"hourglass","href":"/en/faq/image-direct-large-response-stall"}]},{"group":"Account \u0026 Login","icon":"user","pages":[{"title":"How Do I Keep My Account Secure? Why Bind 2FA and a Passkey?","icon":"shield-check","href":"/en/faq/account-security-2fa-passkey"},{"title":"Which email providers does APIYI support for registration?","icon":"mail","href":"/en/faq/email-registration"},{"title":"How do I sign in with a Passkey?","icon":"fingerprint-pattern","href":"/en/faq/passkey-login"},{"title":"GitHub Login Shows 'Account Already Bound'?","icon":"github","href":"/en/faq/github-bindng-bindng-error"},{"title":"What If I Forgot My Password?","icon":"lock","href":"/en/faq/forgot-password"},{"title":"Why is my API Key invalid?","icon":"key","href":"/en/faq/invalid-api-key"},{"title":"How Do I Delete My Account?","icon":"trash","href":"/en/faq/account-deletion"}]}]},{"tab":"Live Updates","icon":"activity","pages":[{"title":"Live Updates","href":"/en/live"}]},{"tab":"Announcements","icon":"megaphone","pages":[{"title":"Announcements","href":"/en/changelog"}]},{"tab":"Promotions","icon":"gift","pages":[{"title":"Promotions","href":"/en/faq/recharge-promotions"}]},{"tab":"Model Pricing","icon":"circle-dollar-sign","pages":[{"title":"Model Pricing","href":"/en/models"}]}]},{"language":"zh-Hant","banner":{"content":"本頁由程式自動轉換為繁體中文,用詞以台灣正體為準;如有歧義請以[簡體中文版](/)為準。","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI 整合","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI 開發者套件(中文)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"使用者口碑 / Wall of Love","items":[{"label":"使用者口碑(中文)","href":"/wall-of-love"},{"label":"Wall of Love (EN)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"首頁"},{"href":"https://imagen.apiyi.com","label":"AI出圖"},{"href":"https://icover.ai","label":"AI影片"}],"primary":{"type":"button","label":"控制台","href":"https://api.apiyi.com/account/profile"}},"pages":[{"title":"zh-Hant","href":"/zh-Hant/faq/timeout-configuration"}]},{"language":"ja","banner":{"content":"このページは AI により翻訳されています。内容に相違がある場合は[English 版](/en)を正としてください。","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI統合","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI開発者キット(中国語)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"ユーザーの声 / Wall of Love","items":[{"label":"ユーザーの声(中国語)","href":"/wall-of-love"},{"label":"Wall of Love(英語)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"ホーム"},{"href":"https://imagen.apiyi.com","label":"AI画像生成"},{"href":"https://icover.ai","label":"AI動画生成"}],"primary":{"type":"button","label":"コンソール","href":"https://api.apiyi.com/account/profile"}},"pages":[{"title":"ja","href":"/ja/faq/timeout-configuration"}]},{"language":"ko","banner":{"content":"이 페이지는 AI로 번역되었습니다. 내용이 다를 경우 [English 버전](/en)을 기준으로 하십시오.","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI 통합","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"AI 개발자 키트(중국어)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"사용자 후기 / Wall of Love","items":[{"label":"사용자 후기(중국어)","href":"/wall-of-love"},{"label":"Wall of Love (영문)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"홈"},{"href":"https://imagen.apiyi.com","label":"AI 이미지 생성"},{"href":"https://icover.ai","label":"AI 동영상 생성"}],"primary":{"type":"button","label":"콘솔","href":"https://api.apiyi.com/account/profile"}},"pages":[{"title":"ko","href":"/ko/faq/timeout-configuration"}]},{"language":"ru","banner":{"content":"Эта страница переведена с помощью ИИ. При расхождениях ориентируйтесь на [английскую версию](/en).","dismissible":true},"footer":{"socials":{"website":"https://api.apiyi.com"},"links":[{"header":"AI-интеграция","items":[{"label":"skill.md","href":"https://docs.apiyi.com/skill.md"},{"label":"llms.txt","href":"https://docs.apiyi.com/llms.txt"},{"label":"llms-full.txt","href":"https://docs.apiyi.com/llms-full.txt"},{"label":"model-registry.json","href":"https://docs.apiyi.com/model-registry.json"},{"label":"Набор AI-разработчика (кит.)","href":"/developer-kit"},{"label":"AI Developer Kit (EN)","href":"/en/developer-kit"}]},{"header":"Отзывы пользователей / Wall of Love","items":[{"label":"Отзывы пользователей (на китайском)","href":"/wall-of-love"},{"label":"Wall of Love (EN)","href":"/en/wall-of-love"}]}]},"navbar":{"links":[{"href":"https://api.apiyi.com","label":"Главная"},{"href":"https://imagen.apiyi.com","label":"Генерация изображений"},{"href":"https://icover.ai","label":"Генерация видео"}],"primary":{"type":"button","label":"Консоль","href":"https://api.apiyi.com/account/profile"}},"pages":[{"title":"ru","href":"/ru/faq/timeout-configuration"}]}]},"title":"How do I avoid API timeouts? - API易文档中心","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["10e4515597","a74be98ba7"],"chunks":["BannerMarkdown-cfwQA_n9.js","dist-2LoAhjKH.js","lib--scc4DXi.js","lib-B8HbPgcC.js","clsx-DZLdJUrt.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","zoom-image-lightbox-CaUwvYH3.js","lightbox-handle-r17bVUz3.js"]}