---
title: "Batch Generate"
method: POST
path: "/api/batch/generate"
tags: ["Generate weather files"]
---

# Batch Generate

`POST /api/batch/generate`

## Request

- Base URL: `https://epw.tools`
- URL: `https://epw.tools/api/batch/generate`
- Auth: none declared

Submit up to 50 EPW generation jobs in a single request.
Requires a valid X-API-Key header. Each job costs 1 credit.
Returns a list of job_ids to poll via GET /api/jobs/{job_id}.

## Headers

- `X-API-Key` string, nullable

## Request body

- BatchRequest
  - `jobs` BatchJobSpec[], required
    - `type` string, required
    - `lat` number, required
    - `lon` number, required
    - `location_name` string, required
    - `year` integer, nullable
    - `start_year` integer, nullable
    - `end_year` integer, nullable
    - `file_type` string
    - `data_source` string
    - `dc_edition` string
    - `weights` object
    - `use_case` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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