---
title: "Load Layer 2 — AI-extracted transformer peak load from PDF (async job)"
method: POST
path: "/api/znp/projects/:projectId/layer2"
tags: ["Zielnetzplanung (ZNP)"]
---

# Load Layer 2 — AI-extracted transformer peak load from PDF (async job)

`POST /api/znp/projects/:projectId/layer2`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/znp/projects/:projectId/layer2`
- Auth: none declared

Accepts either the path of a PDF uploaded via `POST /api/datasources/uploads` or an inline Base64-encoded PDF (`fileContentBase64`). Parses the document with pdf-parse, then calls Gemini (structured JSON output) to extract the maximum simultaneous annual peak transformer load (Jahreshöchstlast), transformer ID, and nominal transformer capacity. The nominal capacity is converted to kW in the extractor using cos(phi)=0.95. Adds a Measurement node plus a calibration node and enables the Layer 2 short-circuit in calculateGFactor: the measured value replaces the theoretical Layer 1 estimate. REST callers receive HTTP 202 + jobId; poll GET /api/jobs/:jobId/status for Chain-of-Thought log messages.

## Path parameters

- `projectId` string, required

## Query parameters

- `token` string

## Request body

- union
  - object
    - `filePath` string, required
    - `fileContentBase64` string
    - `fileName` string
    - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.
  - object
    - `filePath` string
    - `fileContentBase64` string, required
    - `fileName` string
    - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `202`

Job accepted — poll statusUrl for AI extraction logs and result.

- object
  - `success` boolean
  - `jobId` string
  - `status` string
  - `message` string
  - `statusUrl` string
  - `resultUrl` string

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
