Cloud API

The fastest way to build an integration is to point your LLM (Claude, ChatGPT, etc.) at the sacli command-line tool and ask it to explore the API. sacli is a 6 MB download with no dependencies. It prints every URL it calls, every header it sends, and every response it receives, giving an LLM everything it needs to replicate the calls in any language.

Prompting Claude Code to explore the SolarAssistant API via sacli
Claude Code exploring the SolarAssistant API

Authentication

Generate an API token on your user details page:

Generate API token on the user details page

Endpoints

List sites

Returns all sites on the account:

curl -H "Authorization: Bearer <token>" https://solar-assistant.io/api/v1/sites

Example JSON response:

[
  {
    "id": 19489,
    "name": "my-site",
    "proxy": "us-htz-1",
    "last_seen_at": "2026-05-11T12:00:00Z",
    ...
  }
]

Generate site access token

Returns temporary credentials for direct access to a specific site through the cloud proxy. Use the site ID from the list above:

curl -X POST -H "Authorization: Bearer <token>" https://solar-assistant.io/api/v1/sites/<site-id>/authorize

Example JSON response:

{
  "host": "us-htz-1.solar-assistant.io",
  "site_id": 19489,
  "site_name": "my-site",
  "site_key": "9u10PW2b...",
  "token": "eyJhbGci..."
}

The token expires after 7 days. Use the host, site_key and token for proxy pass-through requests described below.

Proxy pass-through

With the credentials from the authorize step, you can call the full REST and WebSocket device APIs through the SolarAssistant cloud proxy with no local network access required.

Send requests to the proxy host from the authorize response, passing the site ID and site key as headers:

curl \
  -H "Authorization: Bearer <token>" \
  -H "Site-Id: <site-id>" \
  -H "Site-Key: <site-key>" \
  https://<host>/api/v1/metrics

All device API endpoints (metrics, history, settings) are available through the proxy using the same paths as local access.