# WritersLogic Quota Reservation Check

> WritersLogic Quota Reservation Check is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Computes available quota from a caller-supplied snapshot and determines whether a requested amount fits, without actually reserving any quota

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/quota-reservation-check?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-quota-reservation-check-4105d8ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-Jx4ODyrHJW7c604pm2u9

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 writerslogic-quota-reservation-check-4105d8ee -d '<json body>'
```

Example prompt: My quota window ends at 2024-12-01T00:00:00Z, the limit is 10000, I've used 7200, reserved 500, and I have two pending reservations — ID 'res-1' for 300 expiring at 2024-11-30T12:00:00Z and ID 'res-2' for 400 with no expiry — can a new request for 400 units fit as of right now (2024-11-30T10:00:00Z), assuming the snapshot was taken at 2024-11-30T09:55:00Z and can be at most 600 seconds old?

## When to prefer this

Use this endpoint when you need a lightweight, stateless check of whether a requested quota amount fits within a caller-supplied snapshot — particularly in distributed or multi-agent systems where you hold your own quota state and want to validate headroom before attempting a real reservation elsewhere. It is ideal for pre-flight checks before expensive operations, staleness guards on cached quota snapshots, and expired-window detection. Do not use it as an actual rate limiter or reservation system — use a token-bucket coordination service for that. Prefer this over building your own quota arithmetic when you need consistent handling of pending reservation expiry, snapshot age validation, and window boundary edge cases.

## Known failure modes

- Snapshot older than maxSnapshotAgeSeconds returns 'unknown' rather than pass or fail
- Window that ended at or before asOf returns 'unknown' even if quota numerically fits
- Missing required quota.limit or quota.used fields causes a validation error
- Invalid RFC 3339 timestamps in asOf, snapshotAt, windowEndsAt, or pending expiresAt cause rejection
- Pending array exceeding 200 items is rejected
- Integer values exceeding Number.MAX_SAFE_INTEGER are rejected
- Race conditions: a 'pass' result does not guarantee quota is available when the caller later acts, as this endpoint performs no actual reservation

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns a decision (pass, fail, or unknown) indicating whether the requested amount fits within available quota, along with the computed available quota (limit minus used, reserved, and unexpired pending reservations), the reason for the result (e.g. stale snapshot, expired window, insufficient quota), and an explicit notice that nothing is reserved by this call so concurrent consumers may still consume quota before the caller acts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "asOf": {
   "type": "string",
   "maxLength": 40,
   "description": "RFC 3339 instant of the decision (no clock is read)."
  },
  "quota": {
   "type": "object",
   "required": [
    "limit",
    "used"
   ],
   "properties": {
    "used": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 0
    },
    "limit": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 0
    },
    "reserved": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 0,
     "description": "Amount already reserved and counted outside `pending`."
    },
    "windowEndsAt": {
     "type": "string",
     "maxLength": 40,
     "description": "RFC 3339 end of the quota window the snapshot belongs to."
    }
   },
   "additionalProperties": false
  },
  "pending": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "amount"
    ],
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1
     },
     "amount": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
     },
     "expiresAt": {
      "type": "string",
      "maxLength": 40,
      "description": "RFC 3339; a reservation expiring at or before asOf no longer holds quota. Omit for a hold that does not expire."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 200
  },
  "request": {
   "type": "object",
   "required": [
    "amount"
   ],
   "properties": {
    "amount": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 0
    }
   },
   "additionalProperties": false
  },
  "snapshotAt": {
   "type": "string",
   "maxLength": 40,
   "description": "RFC 3339 instant the quota numbers were read."
  },
  "maxSnapshotAgeSeconds": {
   "type": "integer",
   "maximum": 31536000,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-quota-reservation-check-4105d8ee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
