Queue Backlog Horizon
Replay a queue across time windows with arrivals before service and identify remaining backlog and the first fully drained window.
Custom requests cost 0.04 USDC on Base.
Download example JSON · OpenAPI · Source and usage
Pay with a browser wallet · Open example in checkout
POST a JSON request to /queue-backlog-horizon/v1/check with an x402 V2 client.
Worked example
Request
{
"initial_backlog": 12,
"windows": [
{
"duration_seconds": 30,
"arrivals": 3,
"service_capacity": 7
},
{
"duration_seconds": 20,
"arrivals": 2,
"service_capacity": 16
},
{
"duration_seconds": 10,
"arrivals": 5,
"service_capacity": 2
}
]
}Result
{
"ending_backlog": 3,
"peak_backlog": 15,
"first_drained_at_seconds": 50,
"windows": [
{
"end_seconds": 30,
"served": 7,
"unused_capacity": 0,
"ending_backlog": 8
},
{
"end_seconds": 50,
"served": 10,
"unused_capacity": 6,
"ending_backlog": 0
},
{
"end_seconds": 60,
"served": 2,
"unused_capacity": 0,
"ending_backlog": 3
}
]
}Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter