Every Portrix response includes an
x-portrix-request-id header. Copy this value and include it whenever you contact support — it allows the team to locate your specific request in the logs and resolve issues significantly faster.403 Forbidden
403 Forbidden
Symptom: The API returns
403 Forbidden, even though your API key is valid and active.Cause: Your API key exists but lacks the permissions required for the operation you’re attempting. API keys can be scoped to specific models, endpoints, or usage types.Fix:- Go to Settings > API Keys in the dashboard.
- Click on the key you’re using and review its Scopes and Restrictions.
- If the key is restricted to specific models, ensure the model you’re requesting is on the allowed list.
- If you need broader access, either update the key’s scopes or create a new unrestricted key.
403 can also occur if you’re on the Free plan and attempting to access a feature or model that requires a paid plan. Check the Billing page for plan-level restrictions.404 Model Not Found
404 Model Not Found
Symptom: The API returns
404 with a message like model not found or unknown model.Cause: The model ID you specified is incorrect, misspelled, or not yet available on your account.Fix:- Verify you’re using the full
{provider}/{model}format. For example:- ✅
openai/gpt-4o - ✅
anthropic/claude-3-5-sonnet - ❌
gpt-4o(missing provider prefix) - ❌
claude-3.5-sonnet(wrong separator and missing prefix)
- ✅
- Fetch the complete list of models available to your account to find the exact ID:
- Check the Supported Models page for a curated list of popular model IDs.
- If a model you expect to see is missing from the list, contact support — it may require enablement on your account.
429 Too Many Requests
429 Too Many Requests
Symptom: The API returns
429 Too Many Requests intermittently or consistently under load.Cause: You’ve exceeded your requests-per-minute (RPM), tokens-per-minute (TPM), or daily token quota.Fix:- Read the
Retry-Afterresponse header — it tells you exactly how many seconds to wait before retrying. - Implement exponential backoff with jitter in your application (see code examples on the Rate Limits page).
- Review your current usage on the Usage page in the dashboard to understand what’s driving the spike.
- If you’re consistently hitting limits, upgrade your plan or contact support for a custom quota.
500 / 502 / 503 from Provider
500 / 502 / 503 from Provider
Symptom: The API returns a
500 Internal Server Error, 502 Bad Gateway, or 503 Service Unavailable.Cause: The upstream provider (OpenAI, Anthropic, Google, etc.) is experiencing an outage, degraded performance, or the request exceeded the provider’s internal limits.Fix:- Check the Portrix status page for any active incidents.
- Check the affected provider’s status page directly (e.g., status.openai.com, status.anthropic.com).
- Configure fallback routing in your Portrix request to automatically retry with a different model or provider when a
5xxerror occurs:
- For transient errors, implement a retry with backoff —
5xxerrors from providers are often short-lived.
Streaming connection drops
Streaming connection drops
Symptom: When using
stream: true, the connection closes before the response is complete. You receive a partial response or a connection reset error.Cause: Network timeouts, intermediate proxy configurations, or client-side read timeouts that are too short for the length of the response.Fix:- Increase your HTTP client’s read timeout. For long completions, a timeout of 120–300 seconds is recommended.
- Ensure any proxies or load balancers between your client and Portrix are configured to support long-lived HTTP connections (disable aggressive idle timeouts).
- Handle stream interruptions in your code and reconnect if needed:
- If the issue persists, try without streaming to determine whether it’s a streaming-specific problem.
Wrong base URL
Wrong base URL
Symptom: Requests succeed but return OpenAI branding in errors, or you see Use the
401 errors even with a valid Portrix key. Alternatively, your code silently continues using the OpenAI API and you’re being billed by OpenAI.Cause: Your base URL is still set to https://api.openai.com/v1 instead of https://api.portrix.ai/v1.Fix:
Explicitly set the base URL in your client configuration. Do not rely on defaults:PORTRIX_BASE_URL environment variable to manage this across environments. See Environment Variables for details.Model returns unexpected output
Model returns unexpected output
Symptom: The model’s responses seem off — wrong tone, missing capabilities, or behavior inconsistent with what you expect.Cause: Several factors can cause this:
- You may be targeting the wrong model (e.g.,
gpt-4o-miniinstead ofgpt-4o) - A missing or incomplete system prompt that the original model relied upon
- Provider-specific behavior differences — models from different providers respond differently to the same prompts
- Double-check the
modelfield in your request. Log it explicitly if you’re setting it dynamically. - Inspect the
modelfield in the API response — it reflects the model that actually served the request. - When switching from one provider’s model to another, expect to adjust your system prompt. Instructions that work perfectly for GPT-4o may need tuning for Claude or Gemini.
- If you have fallbacks configured, confirm which model in your fallback chain actually fulfilled the request by checking the
x-portrix-modelresponse header.
Getting help
If these steps don’t resolve your issue, the Portrix support team is here to help:- Email: [email protected]
- In-dashboard chat: Click the chat bubble on app.portrix.ai
- The
x-portrix-request-idfrom the response headers of the failing request - The full request you’re sending (redact your API key)
- The complete error response body
- The SDK or HTTP client you’re using and its version