Would this request fit in the remaining quota, given a snapshot and pending reservations? (snapshot-bound)
Computes available quota from a caller-supplied snapshot (limit, used, reserved) minus the unexpired pending reservations and says whether a requested amount fits. This is a read of the numbers you supply as of snapshotAt: it reserves nothing, so concurrent consumers can still use the quota before you do, and every response says so. A stale snapshot gives unknown, not pass; a window that ended at or before asOf gives unknown even when the request does not fit, because the numbers belong to the previous window. Does not query any provider and is not a rate limiter (use the coordination token-bucket for reservations).
What you get
Avoids starting a job that cannot finish for lack of quota, without claiming a guarantee it cannot give.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/quota-reservation-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/quota-reservation-check \
-H 'content-type: application/json' \
-d '{"quota":{"limit":1000,"used":700,"reserved":50},"pending":[{"id":"job-1","amount":100}],"request":{"amount":120},"snapshotAt":"2026-11-04T12:00:00Z","asOf":"2026-11-04T12:00:20Z","maxSnapshotAgeSeconds":60}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
quota | object | yes | |
pending | array<object>; max 200 items | no | |
request | object | yes | |
snapshotAt | string; length 0..40 | yes | RFC 3339 instant the quota numbers were read. |
asOf | string; length 0..40 | yes | RFC 3339 instant of the decision (no clock is read). |
maxSnapshotAgeSeconds | integer; 0..31536000 | no |
Example request body
{
"quota": {
"limit": 1000,
"used": 700,
"reserved": 50
},
"pending": [
{
"id": "job-1",
"amount": 100
}
],
"request": {
"amount": 120
},
"snapshotAt": "2026-11-04T12:00:00Z",
"asOf": "2026-11-04T12:00:20Z",
"maxSnapshotAgeSeconds": 60
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
available | integer | no | limit - used - reserved - held pending; may be negative if oversubscribed. |
held | integer | no | Sum of unexpired pending reservations. |
shortfall | integer | no | How much the request exceeds available; 0 when it fits. |
snapshotBound | boolean | no | Always true: nothing is reserved. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent