# 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-15).

Performs date/time arithmetic: diff two datetimes, add/subtract intervals, convert between epoch and ISO-8601, and reformat via strftime patterns.

## Facts

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

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-6ae82d04 -d '<json body>'
```

Example prompt: How many days are between March 15, 2025 and November 3, 2025, and what date is 45 days after March 15?

## When to prefer this

Choose this endpoint when you need lightweight, serverless date math without setting up a library — especially for epoch↔ISO conversion, interval arithmetic, or custom date formatting. It's ideal for agents that need quick one-off datetime computations without executing code locally. Prefer it over general-purpose code execution endpoints when the task is purely date/time manipulation and you want a predictable, structured JSON response.

## Known failure modes

- Invalid datetime string format returns a parse error
- Unsupported strftime directive may produce partial or empty output
- Negative interval or ambiguous timezone can yield unexpected results
- Missing required operation field returns a 400 bad request
- Epoch value out of representable range may cause overflow error

## 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 operation: a numeric difference (in days, hours, seconds, etc.), a new datetime after adding/subtracting an interval, an ISO-8601 string converted from epoch or vice versa, or a custom-formatted date string produced by strftime.

## 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-6ae82d04/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)
