Troubleshooting

Fix 524 Timeouts in Long-Running AI API Requests

Use smaller bounded requests, model-specific async task patterns for long generation jobs, and retry only after checking Usage Logs.

Last verified: 2026-06-05

Configuration summary

Base URLhttps://api.metisrouter.com/v1
API keyMETISROUTER_API_KEY
Model IDsCopy exact IDs from /models or /docs/models

Steps

  1. Confirm the request uses https://api.metisrouter.com/v1 or the documented direct provider endpoint.
  2. Copy the exact model ID from /models or /docs/models.
  3. Set a bounded max_tokens, max_completion_tokens, or max_output_tokens value when the task can grow.
  4. Send a short test request and check Usage Logs for the request id, latency, usage, and charged amount.

Symptoms

Long video, image, or agent tasks may exceed gateway or client timeouts.

  • The tool may show an authentication, model, streaming, timeout, or provider error.
  • Usage Logs help separate requests blocked by MetisRouter from requests that reached an upstream provider.

Why it happens

Most setup failures come from mismatched base URLs, display names used as model IDs, missing output limits, unsupported endpoint types, or insufficient balance.

  • Use API model IDs, not prettified display names.
  • Match text, image, video, audio, and embedding requests to their documented endpoints.
  • Keep request IDs for support and retries.

How to verify

After applying the fix, run one short request and confirm the platform recorded the model, endpoint, token or asset usage, latency, and cost.

FAQ

Should I retry immediately?

Retry only after checking whether Usage Logs already show a successful upstream request or a billable result.

Which model ID should I use?

Use the exact API model ID from /models or /docs/models. Display titles are not guaranteed to work as request model IDs.