71trust / 100

Invoice Text Extraction Execute

by tradepilotusa.com in Markets & finance

x402 APIPassing, checked 2 h ago

Extract invoice fields from supplied text, preserve currency and identifiers, and mark missing values; no OCR or accounting posting. Uses buyer-supplied information only; no external research or outbound actions. Returns a draft for human review.

POST https://www.tradepilotusa.com/api/agent-commerce/v1/services/invoice_text_extraction/execute

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
949 ms typical, 1.1 s slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://www.tradepilotusa.com/api/agent-commerce/v1/services/invoice_text_extraction/execute' \
  -H 'content-type: application/json' \
  --data-raw '{"audience":"Business operations manager","brief":"Extract invoice fields from supplied text, preserve currency and identifiers, and mark missing values; no OCR or accounting posting. Use only the supplied fictional example material and clearly identify missing evidence.","source_text":"Fictional invoice INV-1001. Seller: Example Supply Company. Buyer: Example Door Company. Date: 2026-09-01. Item: entry door hardware, quantity 2, unit price USD 50. Subtotal USD 100. Tax USD 8.25. Total USD 108.25. Due: 2026-09-30. Payment status is not specified."}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.tradepilotusa.com%2Fapi%2Fagent-commerce%2Fv1%2Fservices%2Finvoice_text_extraction%2Fexecute
const res = await pay("https://www.tradepilotusa.com/api/agent-commerce/v1/services/invoice_text_extraction/execute", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"audience\":\"Business operations manager\",\"brief\":\"Extract invoice fields from supplied text, preserve currency and identifiers, and mark missing values; no OCR or accounting posting. Use only the supplied fictional example material and clearly identify missing evidence.\",\"source_text\":\"Fictional invoice INV-1001. Seller: Example Supply Company. Buyer: Example Door Company. Date: 2026-09-01. Item: entry door hardware, quantity 2, unit price USD 50. Subtotal USD 100. Tax USD 8.25. Total USD 108.25. Due: 2026-09-30. Payment status is not specified.\"}",
});
console.log(await res.json());

Example input

{
  "audience": "Business operations manager",
  "brief": "Extract invoice fields from supplied text, preserve currency and identifiers, and mark missing values; no OCR or accounting posting. Use only the supplied fictional example material and clearly identify missing evidence.",
  "source_text": "Fictional invoice INV-1001. Seller: Example Supply Company. Buyer: Example Door Company. Date: 2026-09-01. Item: entry door hardware, quantity 2, unit price USD 50. Subtotal USD 100. Tax USD 8.25. Total USD 108.25. Due: 2026-09-30. Payment status is not specified."
}

Example output

{
  "artifact": "Illustrative excerpt from a synthetic provider check:\n### Extracted Invoice Fields\n\n| Field             | Value                     |\n|-------------------|---------------------------|\n| Invoice Number    | INV-1001                  |\n| Seller            | Example Supply Company    |\n| Buyer             | Example Door Company      |\n| Invoice Date      | 2026-09-01                |\n| Item Description  | entry door hardware       |\n| Quantity          | 2                         |\n| Unit Price        | USD 50                    |\n| Subtotal          ",
  "assumptions": [
    "The invoice number 'INV-1001' uniquely identifies the invoice.",
    "The unit price and subtotal are consistent and correctly calculated."
  ],
  "evidence_gaps": [
    "Payment status is not specified in the source text.",
    "No invoice address or contact details for seller or buyer are provided."
  ],
  "provenance": {
    "external_research_performed": false,
    "generated_at": "2026-09-22T14:42:47.668Z",
    "source": "buyer_supplied"
  },
  "request_id": "example_invoice_text_extraction",
  "requires_human_review": true,
  "summary": "Extracted key invoice fields from the provided fictional invoice text, preserving currency and identifiers, and clearly marking the missing payment status field.",
  "task": "invoice_text_extraction"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed4021.1 s$0.25
6 h agoPassed402795 ms$0.25
9 h agoPassed402970 ms$0.25
13 h agoPassed402722 ms$0.25
17 h agoPassed4021.0 s$0.25
21 h agoPassed402779 ms$0.25
24 h agoPassed402949 ms$0.25
28 h agoPassed402615 ms$0.25
32 h agoPassed4021.0 s$0.25
35 h agoPassed402650 ms$0.25
39 h agoPassed4021.0 s$0.25
42 h agoPassed4021.0 s$0.25
46 h agoPassed402974 ms$0.25
2 days agoPassed4021.1 s$0.25
2 days agoPassed402676 ms$0.25