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

EndpointPurpose
POST /projects/{id}/interpretPrompt → cited interpretation (sync JSON or SSE stream).
POST /projects/{id}/generateGenerate or modify PLC code — a reviewable proposal (never auto-deployed).
POST /projects/{id}/conversationsOpen a stateful troubleshooting thread.
POST /conversations/{cid}/messagesAppend a turn to a thread.
POST /projects/{id}/analysesStart 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}/sourceRead source — parsed structure, raw file, or aggregated SCL/ladder.
GET /projects/{id}/hmi/values · /hmi/historyRead live tag values & recent history (when a DCA session is streaming).
POST /projects/{id}/exports/plc · /exports/pdfExport the vendor PLC file or a PDF report (async job → download).
POST /projectsIngest an L5X / Siemens export.
POST /projects/{id}/versionsSave a new version from an updated vendor file.
POST /embed-tokensMint a read-only token for the embeddable iframe.

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)