detail field usually tells you exactly what went wrong — it contains a human-readable description of the specific failure, making it straightforward to distinguish between a bad parameter, a missing forecast, or an authentication problem without referring to this page.
Error Response Format
All error responses share a consistent JSON envelope, regardless of the status code:string
A short, machine-readable error code in
snake_case (e.g., "not_found", "unauthorized", "validation_error"). Use this field for programmatic error handling and branching logic.string
A human-readable description of the error, specific to the failing request. This field describes what was wrong and often suggests how to fix it. In validation errors (
422), this may be a structured array of field-level messages.integer
The HTTP status code, mirrored in the response body for convenience when your HTTP client abstracts away status codes.
HTTP Status Codes
The Nexenergie API uses standard HTTP status codes. The table below covers every code you may encounter, its meaning in the context of this API, and the recommended action.4xx errors indicate a problem with the request and will not resolve by retrying without a change. 5xx errors indicate a server-side problem and are safe to retry.Common Errors
401: My token keeps expiring
401: My token keeps expiring
Tokens issued by If you prefer not to manage token lifecycle, generate a long-lived API key from your dashboard — API keys do not expire unless explicitly revoked.
POST /auth/token are valid for 86 400 seconds (24 hours). After that window, every request returns 401 Unauthorized until you obtain a fresh token.The most robust fix is to build automatic re-authentication into your HTTP client. The snippet below wraps every request and transparently refreshes the token whenever a 401 is received:Python
404: Forecast not available for this date
404: Forecast not available for this date
The Nexenergie API returns
404 Not Found when a forecast has not yet been generated for the requested date. Forecasts follow OMIE publication schedules:- Day-ahead forecasts are published D-1 (the day before delivery), typically after the OMIE day-ahead auction closes at 12:00 CET. Requesting a forecast for today or a future date before the model has run will return
404. - Intraday session forecasts (sessions 1–3) are published incrementally on the delivery day, according to the OMIE intraday session schedule.
- Check that the requested date is in the past or has passed the relevant publication cutoff.
- Query the
/forecasts/available-datesendpoint to retrieve the list of dates for which forecasts are currently accessible:
cURL
- Ensure your date format matches the expected
YYYY-MM-DDISO 8601 format. A malformed date string triggers a400 Bad Request, not404.
404 for dates that should be available, contact Nexenergie support — it may indicate a model run failure for that date.429: Rate limit exceeded
429: Rate limit exceeded
The default rate limit is 60 requests per minute per API key or token. When the limit is exceeded, all subsequent requests in that window return If your workload regularly approaches or exceeds the default limit, contact Nexenergie to discuss elevated rate limits for your account.
429 Too Many Requests until the window resets.Use the response headers to determine when you can resume:The safest strategy is exponential backoff with jitter, which prevents multiple clients from hammering the API simultaneously after a shared reset:
Python
For persistent
500 Internal Server Error responses that do not resolve after retrying, please contact Nexenergie support at support@nexenergie.ai and include the request URL, timestamp, and the detail field from the error response to help us investigate quickly.