PLCs.ai API
Interpret PLC code from your own tools.
A stable, versioned HTTP API for working with your PLC projects. Send a prompt about an Allen-Bradley or Siemens project; get a cited, plain-language answer back.
What you can do
| Endpoint | Purpose |
|---|---|
POST /projects/{id}/interpret | Prompt → cited interpretation (sync JSON or SSE stream). |
POST /projects/{id}/generate | Generate or modify PLC code — a reviewable proposal (never auto-deployed). |
POST /projects/{id}/conversations | Open a stateful troubleshooting thread. |
POST /conversations/{cid}/messages | Append a turn to a thread. |
POST /projects/{id}/analyses | Start an async analysis job. |
GET /analyses/{analysisId} | Poll an analysis job's status and results. |
GET /projects · GET /projects/{id} | List projects and read one project's metadata. |
GET /projects/{id}/source | Read source — parsed structure, raw file, or aggregated SCL/ladder. |
GET /projects/{id}/hmi/values · /hmi/history | Read live tag values & recent history (when a DCA session is streaming). |
POST /projects/{id}/exports/plc · /exports/pdf | Export the vendor PLC file or a PDF report (async job → download). |
POST /projects | Ingest an L5X / Siemens export. |
POST /projects/{id}/versions | Save a new version from an updated vendor file. |
POST /embed-tokens | Mint a read-only token for the embeddable iframe. |
At a glance
| Base URL | https://app.plcs.ai/api/v1 |
|---|---|
| Auth | Authorization: Bearer plck_live_… (the org is resolved from the key) |
| Writes | Require an Idempotency-Key header |
| Errors | One envelope with userMessage, suggestedAction, isRetryable |
| Every response | Carries a unique request-id header |
| SDKs | Python (PyPI plcsai) & C# (NuGet) |