https://gateway.ngrok.ai:
- Record the
Ngrok-AIG-Request-Idresponse header. Every response carries it, errors included, and it identifies the request in usage data. - Check the error code and message in the response body. See Error Codes.
- Read
Ngrok-AIG-Attemptsto see whether failover ran. A count above 1 means the gateway tried more than one upstream candidate before it gave up, so the cause is upstream rather than in your request. An absent header means the request failed before any attempt, which points at the request body or the access key configuration. - Verify your app sends an access key—not an upstream provider key.
- Confirm the access key’s configuration allows the provider and model you requested, with routing credentials attached.
- Look the request up in the dashboard at app.ngrok.ai, or query it with the Usage API.
See Handle gateway errors for retry and failover behavior.