# Calendar Month Grid Generator

> Calendar Month Grid Generator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns a calendar month as a grid of week rows (Monday or Sunday start), along with the weekday of the 1st, total day count, and leap year status.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/calendar-month
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/calendar-month-grid-generator-f748f4b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Maagd4qRhSPRPt1OHf7as

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability calendar-month-grid-generator-f748f4b5 -d '<json body>'
```

Example prompt: Can you give me a calendar grid for March 2026 with weeks starting on Monday — I need to know what day the 1st falls on, how many days are in the month, and whether it's a leap year?

## When to prefer this

Use this endpoint when you need a structured, grid-ready calendar layout for a specific month — especially when you also need metadata like leap year status, day count, or the weekday of the 1st. Prefer this over manual date calculations or general-purpose date libraries when you need a pre-formatted week-row grid ready for rendering in a UI or scheduling tool.

## Known failure modes

- Invalid month number (e.g. 0 or 13) returns an error
- Invalid year (e.g. negative or non-integer) returns a validation error
- Missing required fields (year or month) result in a bad request response
- Invalid week-start value (not Monday or Sunday) may return an error or default behavior

## How this service works

Return a month as a grid of week rows (weeks start Monday or Sunday), plus the weekday of the 1st, the day count, and whether it is a leap year.

## Output

Returns a structured object containing: a 2D grid of week rows where each cell is a day number (or null for padding), the weekday of the 1st of the month, the total number of days in the month, and a boolean indicating whether the year is a leap year.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "year": {
   "type": "number"
  },
  "month": {
   "type": "number"
  },
  "first_weekday": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "weeks": [
   [
    0,
    0,
    0,
    0,
    0,
    0,
    1
   ]
  ],
  "days_in_month": 28
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/calendar-month-grid-generator-f748f4b5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
