77trust / 100

Ivr Menu Map

by ton.halowerk.com in Weather & location

x402 APIPassing, checked 10 h ago

Turns transcribed IVR announcements into a menu tree: keys (DTMF digits, star, hash) with option labels, actions (repeat, back, agent), voice options, sub-menus by path, unreached options and inconsistencies.

POST
https://ton.halowerk.com/v1/ivr-menu-map
Price
$0.02
per call in USDC
Uptime
95.8%
last 30 days
Response time
118 ms
181 ms slowest 5%
Last check
Passed
10 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://ton.halowerk.com/v1/ivr-menu-map

Each call costs $0.02 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://ton.halowerk.com/v1/ivr-menu-map
content-type: application/json

{
  "prompts": [
    {
      "path": "",
      "text": "Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0."
    },
    {
      "path": "1",
      "text": "To block a card press 1, for a new PIN press 2, to return to the main menu press star."
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
promptsarray of objectNoAnnouncements with their key path. Alternative to transcript (which is treated as the main menu).
segmentsarray of objectNoAlternative to transcript: segments with start/end in seconds, speaker and text.
time_unitstringNoUnit of start/end in JSON transcripts; auto treats integer values with a median segment length above 60 as milliseconds. One of: auto, s, ms. Default: "auto".
transcriptstring or object or arrayNoTranscript as WebVTT or SRT text (speakers from <v Name> voice tags or "Name:" prefixes), or JSON (text or object) with a list of segments, utterances, turns, cues or words carrying start, end, speaker and text – e.g. the output of medienwerk /v1/stt or /v1/diarize, Whisper, AssemblyAI or Deepgram.

Example response

The provider's example. We can't check it without paying.

Example response, 126 lines
{
  "limitations": [
    "Pattern-based parsing of the transcribed wording; unusual phrasing yields options with label null or none.",
    "Only menus whose announcements are supplied are mapped; the service does not call the line."
  ],
  "result": {
    "menus": [
      {
        "depth": 0,
        "excerpt": "Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0.",
        "options": [
          {
            "action": "menu_or_service",
            "has_prompt": true,
            "key": "1",
            "label": "card services",
            "next_path": "1",
            "phrase": "For card services press 1"
          },
          {
            "action": "menu_or_service",
            "has_prompt": false,
            "key": "2",
            "label": "loans",
            "next_path": "2",
            "phrase": "For loans press 2"
          },
          {
            "action": "agent",
            "has_prompt": false,
            "key": "0",
            "label": "speak to an agent",
            "next_path": null,
            "phrase": "press 0"
          }
        ],
        "path": "",
        "voice_options": []
      },
      {
        "depth": 1,
        "excerpt": "To block a card press 1, for a new PIN press 2, to return to the main menu press star.",
        "options": [
          {
            "action": "menu_or_service",
            "has_prompt": false,
            "key": "1",
            "label": "block a card",
            "next_path": "11",
            "phrase": "To block a card press 1"
          },
          {
            "action": "menu_or_service",
            "has_prompt": false,
            "key": "2",
            "label": "a new PIN",
            "next_path": "12",
            "phrase": "for a new PIN press 2"
          },
          {
            "action": "back",
            "has_prompt": false,
            "key": "*",
            "label": "return to the main menu",
            "next_path": null,
            "phrase": "to return to the main menu press star"
          }
        ],
        "path": "1",
        "voice_options": []
      }
    ],
    "stats": {
      "agent_options": 1,
      "max_depth": 1,
      "max_options_per_menu": 3,
      "menus": 2,
      "options": 6,
      "options_without_prompt": 3,
      "voice_options": 0
    },
    "tree": {
      "options": [
        {
          "action": "menu_or_service",
          "key": "1",
          "label": "card services",
          "submenu": {
            "options": [
              {
                "action": "menu_or_service",
                "key": "1",
                "label": "block a card"
              },
              {
                "action": "menu_or_service",
                "key": "2",
                "label": "a new PIN"
              },
              {
                "action": "back",
                "key": "*",
                "label": "return to the main menu"
              }
            ],
            "path": "1"
          }
        },
        {
          "action": "menu_or_service",
          "key": "2",
          "label": "loans"
        },
        {
          "action": "agent",
          "key": "0",
          "label": "speak to an agent"
        }
      ],
      "path": ""
    },
    "warnings": []
  },
  "service": "ivr-menu-map",
  "status": "success"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.02.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://ton.halowerk.com/v1/ivr-menu-map' \
  -H 'content-type: application/json' \
  --data-raw '{"prompts":[{"path":"","text":"Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0."},{"path":"1","text":"To block a card press 1, for a new PIN press 2, to return to the main menu press star."}]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://ton.halowerk.com/v1/ivr-menu-map' \
  -H 'content-type: application/json' \
  --data-raw '{"prompts":[{"path":"","text":"Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0."},{"path":"1","text":"To block a card press 1, for a new PIN press 2, to return to the main menu press star."}]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.02 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.02" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.02 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fton.halowerk.com%2Fv1%2Fivr-menu-map&method=POST
const res = await pay("https://ton.halowerk.com/v1/ivr-menu-map", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "prompts": [
      {
        "path": "",
        "text": "Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0."
      },
      {
        "path": "1",
        "text": "To block a card press 1, for a new PIN press 2, to return to the main menu press star."
      }
    ]
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.02 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.02"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://ton.halowerk.com/v1/ivr-menu-map",
        json={
            "prompts": [
                {
                    "path": "",
                    "text": "Welcome to Example Bank. For card services press 1. For loans press 2. To speak to an agent, press 0.",
                },
                {
                    "path": "1",
                    "text": "To block a card press 1, for a new PIN press 2, to return to the main menu press star.",
                },
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
10 h agoPassed402144 ms$0.02
23 h agoPassed40239 ms$0.02
3 days agoTimed out---
4 days agoPassed40239 ms$0.02
5 days agoPassed402133 ms$0.02
Show 10 older checks
5 days agoPassed402181 ms$0.02
5 days agoPassed402110 ms$0.02
6 days agoPassed40270 ms$0.02
6 days agoPassed402127 ms$0.02
7 days agoPassed40238 ms$0.02
7 days agoPassed402122 ms$0.02
7 days agoPassed402791 ms$0.02
7 days agoPassed402121 ms$0.02
8 days agoPassed402122 ms$0.02
8 days agoPassed402118 ms$0.02