---
title: "This year so far, completed with the typical year"
method: POST
path: "/api/generate/year-to-date"
tags: ["Generate weather files"]
---

# This year so far, completed with the typical year

`POST /api/generate/year-to-date`

## Request

- Base URL: `https://epw.tools`
- URL: `https://epw.tools/api/generate/year-to-date`
- Auth: API key in header `X-API-Key`

This year's actual weather to ~5 days ago, completed with the
site's typical year: a full EPW for checking a design against the
season that just happened (see backend/ytd_amy.py).

## Headers

- `X-API-Key` string, nullable

## Request body

- YtdRequest
  - `lat` number, required
  - `lon` number, required
  - `location_name` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `402`: Insufficient credits for this operation.
- `422`: Validation Error
- `429`: Rate limit exceeded — retry after a short delay.

---

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