Errors
When an AI request fails, rNet returns an HTTP error status and a JSON body.
Error format
json
{
"message": "Insufficient funds",
"error": "Insufficient funds",
"errorCode": 402
}errorCode repeats the HTTP status. The SDKs turn this into an exception with the message Request failed: 402 - Insufficient funds.
Status codes
| Status | Message | Cause and fix |
|---|---|---|
| 400 | Access token is required | No access_token query parameter. |
| 400 | Access token is malformed | The token is not a valid rNet access token. |
| 400 | Invalid model access | No model query parameter. |
| 400 | Invalid JSON body | The body is not valid JSON. |
| 401 | Access token has expired | Refresh the token and retry. See Sessions. |
| 401 | Access token signature is invalid | The token was not issued by rNet. Sign the user in again. |
| 402 | Insufficient funds | The user is out of credits. Ask them to top up in their Credit Wallet. |
| 422 | Invalid model access | The model ID is unknown or not available. Check Models. |
| 429 | Rate limit exceeded. | Too many requests. Wait and retry. See Rate limits. |
| 500 | Billing … / internal error | Something went wrong at rNet. Retry later. |
| Other 4xx/5xx | The provider's error | The model provider rejected the request (for example an invalid body). The status is passed through; 502 if the provider could not be reached. |