# 24K Labs Datetime Toolkit

> 24K Labs Datetime Toolkit is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Performs date/time arithmetic, diff, epoch-to-ISO conversion, and strftime reformatting in a single API call.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/datetime-toolkit
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-datetime-toolkit-d7f9f000
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K846EGCiBip78Zd2OZq1w

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 24k-labs-datetime-toolkit-d7f9f000 -d '<json body>'
```

Example prompt: How many days are between 2024-03-15T09:00:00Z and 2025-01-01T00:00:00Z? Use the datetime diff operation.

## When to prefer this

Choose this endpoint when you need serverless, one-shot date math without importing a date library — especially useful in agent pipelines where you need to compute offsets, diffs, or reformat timestamps without spinning up a runtime. Prefer it over general-purpose code execution when the task is purely datetime arithmetic.

## Known failure modes

- Invalid datetime string format returns a 400 parse error
- Unsupported strftime directive returns a formatting error
- Missing required operation field returns a validation error
- Out-of-range dates (e.g. year 0 or far future) may return an overflow error
- Malformed interval string (e.g. 'P3Xinvalid') returns a parse failure

## How this service works

One-call date math: diff two datetimes, add/subtract an interval, epoch<->ISO conversion, and reformatting via strftime.

## Output

Returns the computed result depending on the operation: for diff, a numeric duration with unit breakdown; for add/subtract, the resulting datetime in ISO 8601; for epoch conversion, the equivalent ISO string or Unix integer; for strftime, the formatted date string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string"
  },
  "b": {
   "type": "string"
  },
  "op": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "seconds": 6350000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-datetime-toolkit-d7f9f000/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)
