---
title: "Generate Plot"
method: POST
path: "/api/v1/plots/generate"
tags: ["plots"]
---

# Generate Plot

`POST /api/v1/plots/generate`

Generate plot from PyPSA network or NetworkCollection statistics

## Request body

- PlotParams — Request schema for plot generation (extends StatisticsParams with plot_type)
  - `network_ids` string[], required — List of network UUIDs (single or multiple)
  - `statistic` string, required — Statistics method to call
  - `parameters` object — Parameters for the statistics method
  - `plot_type` string, required — Plot method (e.g., 'bar', 'area', 'line')

## Response `200`

Successful Response

- TaskQueuedResponse — Response when a task is queued
  - `task_id` string, required
  - `status_url` string, required
  - `message` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/pypsa/apis/pypsa-app.md) · [All operations](https://skmtc.dev/pypsa/apis/pypsa-app/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pypsa/pypsa-app/revisions/a9fc864817c3/schema)
