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

EndpointPurpose
POST /projects/{id}/interpretAsk a question → a cited answer (sync JSON or SSE stream).
POST /projects/{id}/generatePropose a code change — a plan you approve, then a reviewable proposal (never auto-deployed).
POST /projects/{id}/conversationsOpen a stateful troubleshooting thread.
POST /conversations/{cid}/messagesAppend a turn to a thread.
GET /projects/{id}/analysisRead 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}/sourceRead source — the parsed model, or the original vendor file.
GET /projects/{id}/hmi/values · /hmi/historyRead live tag values & recent history (when a DCA session is serving the project).
POST /projects/{id}/hmi/request-tagsAsk the DCA to read a specific set of live tags on demand.
POST /projects/{id}/exports/plc · /exports/pdfExport the vendor PLC file or a PDF report (async job → download).
POST /projects/{id}/versionsSave a new version from an updated vendor file.
POST /embed-tokensMint 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 URLhttps://app.plcs.ai/api/v1
AuthAuthorization: Bearer plck_live_… (the org is resolved from the key)
WritesRequire an Idempotency-Key header
ErrorsOne envelope with userMessage, suggestedAction, isRetryable
Every responseCarries a unique request-id header
SDKsPython (PyPI plcsai) & C# (NuGet)