Error codes

HTTP status + a JSON error envelope. The envelope matches OpenAI's shape so existing client error handling keeps working.

Envelope

{
  "error": {
    "type": "insufficient_balance",
    "message": "Top up at portal.greenjoules.cloud.",
    "code": 402,
    "request_id": "req_018a3c..."
  }
}

Status reference

StatustypeWhat it meansWhat to do
400bad_requestMalformed JSON, missing required field, invalid model name.Fix the request payload; check error.message.
401invalid_api_keyMissing, malformed, or revoked token.Mint a new token in the portal.
403insufficient_scopeToken doesn't have the scope needed for this endpoint (e.g. an inference token trying to deploy).Use a token with the right scope, or upgrade the existing one in the portal.
404not_foundEndpoint, workload, receipt, or model doesn't exist.Check the path / id.
409conflictWorkload name collision; receipt already verified; etc.Pick a unique name; or treat as success-already-done.
413payload_too_largeRequest body exceeds 50 MB (10 MB for the Inference endpoints).For chat: chunk; for Object Store: use multipart upload.
422unprocessable_entityValid JSON, semantically invalid (e.g. messages empty, malformed tools schema).Check the schema; the message names the field.
429energy_budget_exceededThe workload hit its energy_budget. Or you exceeded the per-account anti-abuse cap (rare).Raise the workload budget or wait for the window to roll over.
402insufficient_balanceAccount balance hit zero or went negative.Top up at the portal. Workloads automatically resume when balance is positive again.
500internal_errorWe broke something. Always a bug on our side.Retry with backoff; if persistent, write to [email protected] with request_id.
502upstream_errorAn underlying provider/model timed out or rejected the request.Retry; use "auto" instead of pinning if a specific model is flaky.
503service_unavailableA region/node is degraded.Retry; the mesh fails over within ~10s. Check status.
504timeoutRequest took longer than the per-endpoint timeout (30s for inference; 5m for batch).Reduce max_tokens; chunk the request; or use a streaming endpoint.

CLI exit codes

For the jc CLI specifically:

CodeMeaning
0Success
1Generic error
2Bad input / argument
3Auth failure (401)
4Resource not found (404)
10Insufficient balance (402)
20Energy budget exceeded (429)

Retry policy

Idempotent operations (GET, PUT to Object Store, DELETE) are safe to retry without coordination. Non-idempotent operations (POST that creates a new resource, chat completions) should use the Idempotency-Key request header — we deduplicate retries with the same key for 24 hours.

Rate-limit headers

Even when we don't throttle (we don't have per-minute caps), every response carries informational headers so you can self-pace:

X-Joule-Budget-Used: 1240
X-Joule-Budget-Cap:  10000
X-Joule-Budget-Reset: 1782273434

Where to look first when things break

  1. The error.message field. We try to make it specific.
  2. The error.request_id. If you ask us for help, include it.
  3. status.greenjoules.cloud — check for ongoing incidents.
  4. The signed receipt for any prior successful call — tells you exactly what silicon you were on, useful for "it was working an hour ago" debugging.
  5. If still stuck: [email protected] with the request ID and a minimal repro.