PLCs.ai API
Interpret PLC code from your own tools.
A versioned HTTP API for working with your PLC projects. Ask a question about an Allen-Bradley, Siemens or CODESYS project; get a cited, plain-language answer back — from the same assistant the app runs.
What you can do
| Endpoint | Purpose |
|---|---|
POST /projects/{id}/interpret | Ask a question → a cited answer (sync JSON or SSE stream). |
POST /projects/{id}/generate | Propose a code change — a plan you approve, then 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. |
GET /projects/{id}/analysis | Read the project's analysis (the current version's, or an older one). |
POST /projects/{id}/analyses · GET /analyses/{analysisId} | Ask for a fresh analysis run, and read that run wherever its version has gone. |
GET /projects · GET /projects/{id} | List projects and read one project's metadata. |
GET /projects/{id}/source | Read source — the parsed model, or the original vendor file. |
GET /projects/{id}/hmi/values · /hmi/history | Read live tag values & recent history (when a DCA session is serving the project). |
POST /projects/{id}/hmi/request-tags | Ask the DCA to read a specific set of live tags on demand. |
POST /projects/{id}/exports/plc · /exports/pdf | Export the vendor PLC file or a PDF report (async job → download). |
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. |
The API reasons over projects you already own. It does not onboard a machine — a project enters the platform through the app or a version-source connector, and there is no create-a-project verb here. Once it exists you can read it, ask about it, propose changes, and save new versions.
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) |