Exergy World Model

Limits, errors, security & tooling

Rate limits and monthly allowances, error codes and retry strategy, sandbox isolation, and SDKs for Exergy World Model (EWM-1).

6 min readPrivate beta

Rate limits, quotas & concurrency

Live self-serve API keys on exergy-lab.com allow 10 authenticated requests per minute and monthly evaluation allowances by plan (250/month on Plus, 1,000/month on Pro, no automatic overages). EWM-1 hosted preview defaults are listed below.

LimitDefaultScope / OverrideWhen exceeded
Live API authenticated rate10 / minPer account on exergy-lab.com429 rate_limited
Live API monthly evaluations250 (Plus) · 1,000 (Pro)Per UTC month429 monthly_limit
EWM-1 preview requests / minute15 / minEWM_RATE_LIMIT_PER_MIN429 Too Many Requests
EWM-1 preview requests / day250 / 24 hEWM_RATE_LIMIT_PER_DAY429 Too Many Requests
Max concurrent requests8 solvesEWM_MAX_CONCURRENT429 Too Many Requests
Max prompt length60,000 charactersHard limit400 Bad Request
Sandbox execution timeout25.0 s per attemptHard limitAutomatic self-repair pass

Error codes & retry strategy

All API errors return a consistent JSON error object.

StatusType / codeCauseWhat to do
400invalid_request_errorMalformed JSON, empty prompt/messages, or prompt over 60,000 charsValidate the body; do not retry unchanged
401auth_or_rate_limit_errorMissing or invalid Authorization: Bearer / X-API-Key headerCheck EXERGY_API_KEY
413PAYLOAD_LIMITPayload exceeds size ceilingTrim the request
422INVALID_DECISION_REQUESTMissing or invalid telemetry field on /v1/energy-decisions/evaluateInspect error.detail
429auth_or_rate_limit_errorRPM, RPD, or concurrency limit exceededExponential backoff with jitter (2 s, 4 s, 8 s, 16 s)
502upstream_errorTransient upstream inference timeoutExponential backoff
Error shape · json
{
  "error": {
    "message": "Rate limit exceeded (15 requests/minute). Please wait before retrying.",
    "type": "auth_or_rate_limit_error",
    "code": 429
  }
}

Sandbox security, isolation & data privacy

  1. Static AST allowlist validation

    Every generated script is parsed into a Python AST before execution. Permitted imports: ewm_thermo_lib and its domain modules, math, cmath, json, collections, itertools, functools, operator, statistics, decimal, fractions, typing, dataclasses, enum, re, copy, numbers, numpy, scipy, and CoolProp. Any reference to os, sys, subprocess, socket, http, urllib, shutil, pathlib, ctypes, multiprocessing, threading, open(), eval(), exec(), compile(), __import__(), globals(), locals(), getattr(), setattr(), or dunder introspection is blocked before execution.

  2. Ephemeral directory & secret-stripped subprocess

    Each execution runs in an isolated temporary directory that is deleted on completion, with all server secrets stripped from the subprocess environment.

  3. Prompt sanitization

    Incoming prompts are stripped of null bytes and control characters and capped at 60,000 characters.

SDKs, HTTP & OpenAPI tooling

  • Interactive playground: open /docs on the server (https://api.exergylab.ai/docs or http://127.0.0.1:8765/docs) to try /v1/solve and /v1/chat/completions in the browser.
  • OpenAPI 3.1.0: download /openapi.json to generate typed clients or import into Postman, Insomnia, or Bruno.
  • OpenAI SDKs: compatible with the official openai clients for Python, TypeScript/Node.js, Go, and Java.
  • Direct HTTP / curl: call /v1/solve or /v1/chat/completions from any language or shell script without installing an SDK.
Direct HTTP via curl · bash
# Solve an engineering prompt from the CLI (fast verified JSON mode)
curl -s https://api.exergylab.ai/v1/solve \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EXERGY_API_KEY" \
  -d '{
    "prompt": "Find the specific enthalpy (kJ/kg) and flow exergy (kJ/kg) of steam at 40 bar and 420 C.",
    "skip_composer": true
  }'

# Check service health
curl -s https://api.exergylab.ai/v1/health