Skip to main content
When a Nomiq API request cannot be completed successfully, the API returns a standard HTTP error status code alongside a JSON response body that gives you the information you need to diagnose and fix the problem. Understanding the error format and the meaning of each code will save you significant debugging time as you build and maintain your integration.

Error Response Format

Every error response from the Nomiq API — regardless of status code — returns a JSON object with a top-level error key containing three fields:

HTTP Status Code Reference

The Nomiq API uses standard HTTP status codes. Codes in the 2xx range indicate success. Codes in the 4xx range indicate a problem with your request that you must fix before retrying. Codes in the 5xx range indicate a transient problem on Nomiq’s infrastructure that you can safely retry.

Retry Strategy

Not all errors should be retried — only 429 and 5xx responses are candidates for automatic retry. Retrying 400, 401, 403, or 404 errors will never succeed because they indicate a fundamental problem with your request or credentials, and repeated retries only waste your quota. For 429 and 500 errors, use exponential backoff: wait one second before the first retry, two seconds before the second, four before the third, and so on, up to a maximum of five retries. Add a small random jitter (50–200ms) to each wait interval to prevent multiple clients from all retrying at the exact same moment.
Do not automatically retry 400, 401, 403, or 404 errors. These status codes mean your request has a fundamental problem — a missing parameter, an invalid key, or a non-existent resource — that will not resolve itself on retry. Fix the underlying issue in your request before sending it again.

Common Error Scenarios

The most frequent cause is a whitespace or formatting issue in the Authorization header. The correct format is exactly Authorization: Bearer sk_live_xxxx — with a single space between Bearer and the key, and no trailing whitespace. Log the raw header string immediately before it is sent and verify it character by character. Also check that your environment variable is resolving to the full key value and not an empty string or the literal text $NOMIQ_API_KEY.A second common cause is environment mismatch: sending a Test key (sk_test_...) to api.nomiq.com or a Live key (sk_live_...) to sandbox.nomiq.com. Each key type is only valid on its matching base URL.
This error fires when your brand generation prompt fails semantic validation before it reaches the AI engine. Common triggers include: prompts shorter than 10 characters, prompts that exceed 2,000 characters, or prompts that contain disallowed content categories. Check the message field for the specific rule violation. If your application accepts freeform user input, add client-side validation before submitting to the API — for example, enforce a minimum length and strip any content that violates the policy listed in the Generation API reference.
A 404 on a recently created project almost always means an environment mismatch. Projects created via the sandbox (sandbox.nomiq.com/v1) are isolated from the production environment (api.nomiq.com/v1). If you created the project with a Test key and are now querying it with a Live key (or vice versa), the project will appear not to exist. Ensure your key type and base URL are consistent across your entire request sequence.
Transient 500 errors on generation endpoints during high-traffic windows typically indicate brief GPU queue pressure on Nomiq’s infrastructure. These errors self-resolve within seconds. Implement idempotent retries: include an Idempotency-Key header on every generation POST, then retry with the same key after a two-second delay. If Nomiq processed the original request before the error, the retry will return the original result without triggering a second generation. Monitor status.nomiq.com to distinguish transient spikes from sustained incidents.

Next Steps

Rate Limits

Review per-plan rate limit thresholds, response headers, and how to implement exponential backoff correctly.

Authentication

Resolve authentication errors by reviewing how to generate, store, and pass API keys correctly.