Catalog/workflow-throttle-decision

Workflow

Debounce/throttle decision API

Given a last-emitted timestamp and a new event time, decides whether to fire now under leading/trailing debounce or throttle and when the next emit is eligible. Answers 'Should I emit this event now?', 'When can I fire again?'.

Price$0.01per request
MethodPOST
Route/v1/workflow/throttle-decision
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
debouncethrottleratedecisionleadingtrailingemitworkflow
API URLhttps://x402.hexl.dev/v1/workflow/throttle-decision
Integration docs
Example request
{
  "mode": "throttle",
  "intervalMs": 1000,
  "lastEmitMs": 0,
  "eventMs": 500
}
Example response
{
  "fire": false,
  "mode": "throttle",
  "edge": "leading",
  "sinceLastMs": 500,
  "nextEligibleMs": 1000,
  "interpretation": "Event suppressed; eligible again at 1000ms."
}
Input schema
{
  "type": "object",
  "required": [
    "mode",
    "intervalMs",
    "eventMs"
  ],
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "debounce",
        "throttle"
      ],
      "examples": [
        "throttle"
      ]
    },
    "intervalMs": {
      "type": "number",
      "examples": [
        1000
      ]
    },
    "lastEmitMs": {
      "type": "number",
      "examples": [
        0
      ]
    },
    "eventMs": {
      "type": "number",
      "examples": [
        500
      ]
    },
    "edge": {
      "type": "string",
      "enum": [
        "leading",
        "trailing"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}