Skip to main content
This page covers how to troubleshoot HTTP errors returned from the Modular Cloud API. If any issue persists, contact us.
This error means the API couldn’t authenticate your request. This can happen for several reasons:
  • The API key expired.
  • The Authorization header is missing.
  • The organization is out of credits, which disables API keys.
  • The organization has reached its monthly spend limit.
To resolve this, try the following:
  • If your key expired, create a new API key.
  • Add the Authorization header with a valid API key to your request.
  • Check your balance on the Billing page and add credits.
  • If your organization reached its monthly spend limit, raise or remove the limit on the Billing page, or wait for it to reset.
This error means the request isn’t authorized for the resource or action.To resolve this, check if the key owner’s role has the necessary permissions to complete the request.
This error means you exceeded a rate limit. This can happen for several reasons:
  • You exceeded the organization’s RPM or TPM limit.
  • You exceeded the model-specific RPM or TPM limit.
  • The model endpoint has reached its total capacity limit. Because the endpoint is shared, requests from all users count toward this limit. As a result, you may reach the endpoint’s capacity even if you have not exceeded your own usage limits.
To resolve this error:
  • Wait before retrying your request.
  • Send the request to a different model endpoint.
  • If you use a coding assistant, set it to retry automatically. For Pi, see Retry rate-limited requests.
If you’re consistently hitting rate limits:
This error means the model server’s request queue is full.To resolve this error:
  • Retry after the delay in the Retry-After header.
  • If you use a coding assistant, set it to retry automatically. For Pi, see Retry rate-limited requests.
This error means the service failed while generating a response.To resolve this error:
  • Retry the request.
  • If it keeps failing, contact us.
This error means no instance is available to serve the request. This happens when an endpoint is down.To resolve this error:
  • Retry after a short delay.
  • Send the request to a different model endpoint.
  • If the endpoint stays unavailable, contact us.
This error means the request didn’t finish before the gateway’s timeout.To resolve this error:
  • Retry with a shorter prompt.
  • Lower the max_tokens value to shorten the response.