generators

Look up or estimate a battery charger's output specs from a free-text description (AI)

Used by the wireframe editor's add-charger dialog. Calls the external OpenRouter chat-completions API (https://openrouter.ai) with the model configured server-side in OPENROUTER_CHARGER_ASSISTANT_MODEL, falling back to OPENROUTER_LOAD_ASSISTANT_MODEL; 20 s timeout. The optional power-source context sharpens the estimate. 20 requests per hour per client IP (counted separately from /api/loads/estimate). The client IP is the first X-Forwarded-For entry, else X-Real-IP, else one shared unknown bucket; counters are kept in memory per server instance and per route. No CORS headers.

post/api/chargers/estimate

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/chargers/estimate
  • Auth: none declared

Request body

descriptionstring required

Free-text description; the length is checked after trimming.

powerSourceNamestring

Connected power source; trimmed, cut to 80 characters, used as context.

powerSourceWattnumber

Rated power of the connected source in W; ignored unless a positive finite number.

Response

Parsed estimate.

namestring required
wattnumber required

Maximum continuous output power in W.

ampsnumber

Rated output current in A.

voltageOut12 | 24 | 48

Battery-side nominal voltage in V.

notestring

Changes

No recorded changes to this operation across all 1 revision of this API.