---
title: "Generate profile-aware narrative"
method: POST
path: "/api/cya/generate"
tags: ["CYA Agent"]
---

# Generate profile-aware narrative

`POST /api/cya/generate`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/cya/generate`
- Auth: none declared

Runs the full CYA pipeline: data retrieval, deterministic regulatory graph, grounding, and LLM synthesis. Returns Option-B response structure.

## Query parameters

- `token` string

## Request body

- object
  - `profile_id` string, required
  - `target_audience` string, required
  - `perspectives` string[], nullable: Enable multi-agent orchestration mode with stakeholder perspectives. If omitted, defaults to classic single-agent v0.26.8 behavior.
  - `context` object, required
    - `location` string, nullable
    - `trigger` string, required
    - `focus_areas` string[], required
    - `capacity_mw` number, nullable: Asset capacity in MW. If >= 10 MW, triggers 110-kV topology hop detection via OSM.
  - `session_id` string, nullable
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

Pipeline result (internal/direct calls only; external callers receive 202)

- object
  - `success` boolean
  - `session_id` string
  - `status` 'completed' | 'needs_clarification'
  - `profile_id` string
  - `target_audience` string
  - `grounding` object
  - `regulatory_graph` object
  - `narrative` object, nullable
    - `headline` string
    - `executiveSummary` string
    - `keyPoints` string[]
    - `recommendedActions` string[]
    - `riskNotes` string[]
  - `clarification` object, nullable
  - `metadata` object

## Other responses

- `202`: Job accepted and queued for async processing

---

[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)
