Developer Docs: /v1/forecast and /v1/clean are live; create API Keys self-service on the SequenxAI Platform.

How a Request Flows

This page walks through the stages a /v1/forecast request passes, from the caller's point of view, and what each stage can return. The check-by-check order is in POST /v1/forecast.

1. Stages

Every request passes these checks in order. A check that passes moves on to the next stage; the errors listed are returned only when that check fails.

StageWhat happensReturned if it fails
AuthenticationChecks Authorization: Bearer sqx_live_… and the key's scope, then that the endpoint is not paused and the key's account or workspace is active; continues if so.INVALID_API_KEY, INSUFFICIENT_SCOPE, ACCOUNT_SUSPENDED, ORG_PENDING_DELETION, 503 SERVICE_UNAVAILABLE (paused, with Retry-After)
IdempotencyWith Idempotency-Key: claims the key, or returns the stored result of an identical, finished request (not billed again).VALIDATION_ERROR (400), IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_IN_PROGRESS
Rate limit checkCounts this request toward the account's requests this minute (shared by all its keys); continues if under the limit.429 forecast-rpm
Request validationParses JSON; checks fields, the per-request row cap (200,000 rows; an oversized request is refused, never queued) and cleaning options; continues if valid.MALFORMED_JSON, VALIDATION_ERROR, POINTS_EXCEEDED, CLEANING_OPTION_UNSUPPORTED
Model selectionConfirms the model is available, h is within its maximum horizon and no entity is longer than its maximum context; continues if so.MODEL_NOT_AVAILABLE, MODEL_OPTION_UNSUPPORTED, HORIZON_EXCEEDS_MODEL, SERIES_TOO_LONG, SERVICE_UNAVAILABLE
Quota reservationReserves "rows + h × entities" of today's points; continues if enough remain.429 forecast-daily-points
CleaningPrepares the data under the effective preset and builds the cleaning report (the raw preset only runs a structural check); continues if it passes. Queues briefly while cleaning capacity is full.SERIES_DISCONTINUOUS, TIMESTAMP_IRREGULAR, FREQ_*, SERIES_TOO_SHORT, SERIES_TOO_LONG (the cleaned grid is longer than the model's context), RAW_INPUT_INVALID and others; 503 SERVICE_UNAVAILABLE with Retry-After if the queue wait runs out (retry later)
InferenceSends the cleaned series to the model for point forecasts and intervals.MODEL_BUSY, GATEWAY_TIMEOUT, SERVICE_UNAVAILABLE
SettlementSettles the reservation to the actual billable points and returns the response.—

A failure at any stage releases the reserved points; error responses are never metered.

  1. Create a sqx_live_… key on the SequenxAI Platform and keep it in a server-side environment variable.
  2. Dry-run with /v1/clean first to confirm frequency, time zone and cleaning decisions. This step is free.
  3. Call /v1/forecast and log the response's request_id, effective_policy.id and usage.
  4. Handle failures by error.code: fix the request on 422, retry after Retry-After on 429 and 503/504; see Error Codes.