{"service":"mart402","version":"0.1.0","payment":{"x402":{"enabled":true,"network":"base-sepolia"},"dev_free_mode":false},"receipts":{"note":"every paid call returns X-Receipt-Id; GET /v1/receipts/{id} re-fetches the result for free (payments are never lost). Retrying the same X-PAYMENT is idempotent.","retention_days":30},"sandbox":{"url":"https://mart402.dev","network":"base-sepolia","note":"identical API with testnet USDC (faucet.circle.com); LLM-backed products return fixed samples (sample:true) instead of executing"},"status":{"public_stats":"/stats"},"rate_limits":{"paid_endpoints":"no fixed rate limit - per-call x402 payment plus abuse protection are the constraint","free_endpoints":{"POST /v1/parse/quote":"20 requests/hour/IP","POST /v1/portrait-precheck":"10 requests/hour/IP"}},"samples":{"note":"free recorded sample responses","index":"/samples"},"categories":["documents","verification","company-data","web","vision","jp-statutory"],"pricing_changelog":[{"date":"2026-08-19","change":"jp-statutory line +2: jp-payslip-audit 0.02 (recompute-and-diff payslip audit), jp-crypto-tax 0.05 (NTA-method crypto realized income, max 300 tx/call)","reason":"both verified against official primary sources (payslip: official grade table + computer-formula withholding; crypto: all NTA FAQ examples match to the yen). Priced on the existing ladder: audit above verify (0.015), user-data computation at the mid-price tier (0.05)"},{"date":"2026-08-18","change":"new product line jp-statutory: 9 deterministic Japanese statutory calculators (payroll-net 0.02, bonus-net 0.01, social-insurance 0.01, dependent-threshold 0.02, consumption-tax 0.01, business-days 0.003, overtime-wage 0.015, retirement-tax 0.02, mortgage 0.005) + jp-payroll-suite bundle 0.05","reason":"priced at/below category medians measured across the whole x402 census (salary/labor 0.02, tax 0.01, calculator 0.001-0.005); component products sit below the composite; free full-fidelity sandbox (engine is LLM-free). Errors and unverified rules are never billed"},{"date":"2026-08-10","change":"no-food / no-face calls are now effectively free: meal-vision responses with food_detected=false and portrait-analysis face_not_detected responses include a single-use same-product retry credit (pass as pack_code)","reason":"charter art.1 - x402 settlements are final, so we return the value instead: we do not keep your money for a photo of your desk"},{"date":"2026-08-10","change":"meal-vision 0.04 -> 0.05: every call is now a 3-run VLM consensus (median-run verdict, per-call kcal spread and item agreement disclosed)","reason":"run-to-run variance measured at +-15% on identical photos; consensus halves it and makes per-call reliability machine-readable. Same consensus-pricing precedent as ocr. Still below the cheapest competitor (0.054)"},{"date":"2026-08-10","change":"style-report 1.99 -> 2.99 (pre-launch; no calls were ever sold at 1.99); new product: report-pack 19.90 = 10 credits at 1.99/unit","reason":"repositioning against the human virtual-analysis market (89-300 USD) and consumer retail apps (6.99 one-time): 2.99 wholesale leaves reselling agents a 10x+ margin; the 10-pack preserves the 1.99 unit price for volume agents"},{"date":"2026-08-09","change":"new product: style-profile 0.05 (v2.0)","reason":"integrated styling verdict (color + face-impression geometry + frame + published integration rules); priced at the probe-budget ceiling like document-pipeline"},{"date":"2026-08-09","change":"portrait-analysis 0.04 -> 0.05 (v1.1)","reason":"capability upgrade: 1-3 images per call (flat), measured pixel colorimetry (CIELAB/ITA) consensus, cross-photo consistency checks, style advice"},{"date":"2026-08-09","change":"pricing v2: ocr 0.005 -> 0.05; verify 0.005 -> 0.015; parse 0.005 -> 0.01/doc (text), 0.012 -> 0.015/page (scanned); extract 0.003/0.006 -> 0.005/0.01; structured 0.02 -> 0.03; jp-company 0.02 -> 0.03; enrich 0.015 -> 0.03","reason":"reposition into the p50-p75 band of each measured category (Market402 full-market radar): verification features (consensus, hallucination guard, registry grounding) are priced, not discounted. Entry tier (pdf utilities) unchanged"},{"date":"2026-08-09","change":"new products: meal-vision 0.04, portrait-analysis 0.04","reason":"vision analysis lineup (image-services Wave 1); priced in the market p50-p75 band for vision-backed analysis, under the 0.05 self-probe budget ceiling"},{"date":"2026-08-04","change":"verify 0.001 -> 0.005; extract fast 0.002 -> 0.003","reason":"market alignment: all-category median settlement is USD 0.01 (Market402 full-market measurement); prices stay below median while leaving the bottom percentile"}],"errors":{"quote_expired_or_unknown":{"retryable":true,"action":"requote"},"receipt_not_found":{"retryable":false,"action":"fix_input"},"not_a_pdf":{"retryable":false,"action":"fix_input"},"too_large_20mb":{"retryable":false,"action":"fix_input"},"llm_route_pending_supplier_approval":{"retryable":true,"action":"wait"},"payment_verify_failed":{"retryable":true,"action":"retry_payment"},"fetch_error":{"retryable":true,"action":"retry"},"use_post_with_json_body":{"retryable":false,"action":"fix_input"},"not_an_image":{"retryable":false,"action":"fix_input"},"too_large_10mb":{"retryable":false,"action":"fix_input"},"provide_image_url_or_base64":{"retryable":false,"action":"fix_input"},"ocr_engines_unavailable":{"retryable":true,"action":"retry"},"company_required":{"retryable":false,"action":"fix_input"},"resolve_failed":{"retryable":false,"action":"fix_input"},"site_unreachable":{"retryable":true,"action":"retry"},"blocked_internal_target":{"retryable":false,"action":"fix_input"},"rate_limited":{"retryable":true,"action":"slow_down"},"invalid_input":{"retryable":false,"action":"fix_input"},"pipeline_scan_pages_over_3":{"retryable":false,"action":"fix_input"},"need_2_to_10_urls":{"retryable":false,"action":"fix_input"},"bad_page_range":{"retryable":false,"action":"fix_input"},"total_over_10mb":{"retryable":false,"action":"fix_input"},"over_sync_limit_20p(async_planned)":{"retryable":false,"action":"fix_input"},"vision_engine_unavailable":{"retryable":true,"action":"retry"},"vision_parse_failed":{"retryable":true,"action":"retry"},"face_not_detected":{"retryable":false,"action":"fix_input"}},"products":[{"id":"extract","category":"web","endpoint":"POST /v1/extract","description":"URL -> main-content Markdown + metadata. JS-heavy sites are auto-rendered","price_usd":{"fast":0.005,"heavy_auto_fallback":0.01,"cache_hit":"half price"},"input":{"url":"string","mode":"auto|fast|heavy","ttl":"cache seconds (0=no cache)"},"policy":{"robots_txt":"respected","terms":"/terms (target-site rights are caller's responsibility)"}},{"id":"parse","category":"documents","endpoint":"POST /v1/parse/quote -> POST /v1/parse","description":"PDF -> structured Markdown. Free quote first (page count, route, final price), then pay via x402. Text-embedded and scanned PDFs are auto-routed","price_usd":{"text_embedded_flat_per_doc":0.01,"scanned_ocr_per_page":0.015,"max_sync_pages":20,"quote":"free (valid 1h); the quoted price is final"},"input":{"quote":{"url":"PDF url"},"parse":{"quote_id":"from quote"}},"note":"scanned PDFs return consensus{confidence,flags} + ocr_quality (hallucination-guarded, Mistral+Google Vision)"},{"id":"ocr","category":"documents","endpoint":"POST /v1/ocr","description":"Single image -> text with hallucination-guarded quality signals: dual-engine consensus (VLM + traditional OCR), calibrated confidence, per-segment corroboration. Japanese-strong","price_usd":{"per_image":0.05},"input":{"image_url":"string (or image_base64)","image_base64":"string (PNG/JPEG/WebP/GIF/BMP/TIFF, max 10MB)","lang":"japanese|latin (default japanese; affects hallucination checks)"},"sample_output":"/samples/ocr"},{"id":"enrich","category":"company-data","endpoint":"POST /v1/enrich","description":"Company name/domain/URL -> verified company profile from primary sources: official-site extraction + free authoritative registries (GLEIF LEI, Japan NTA corporate number). Every field carries evidence (source URL + match grade) and calibrated confidence; missing fields are honest nulls, never guesses","price_usd":{"per_company":0.03},"input":{"company":"string (name, domain, or URL)","country_hint":"optional (e.g. jp, us)"},"note":"resolution failures (unknown name, unreachable site) are returned BEFORE any payment is settled - you are not charged for them","sample_output":"/samples/enrich"},{"id":"verify","category":"verification","endpoint":"POST /v1/verify","description":"Invoice field verification: tax-rate consistency, line-item totals, JP invoice registration number (T+13 digits) check-digit + corporate-number existence observation against the official Japan NTA registry (with vendor-name cross-check), normalized accounting JSON","price_usd":{"per_call":0.015},"input":{"fields":"extracted invoice fields (JSON)","line_items":"optional [[name, qty, unit, amount], ...]"},"note":"corp_registry reports EXISTENCE of the underlying corporate number only - it is NOT the qualified-invoice-issuer registration status. Sole proprietors are not in the corporate registry, so not_found never fails verification","sample_output":"/samples/verify"},{"id":"structured","category":"web","endpoint":"POST /v1/structured","description":"Fills YOUR JSON schema from any URL. Hybrid LLM extraction + source-text canonicalization. Output contains only your schema keys; missing values are null","price_usd":{"per_call":0.03},"input":{"url":"string","schema":"JSON schema as {key: description}","instructions":"optional extra extraction guidance"},"sample_output":"/samples/structured"},{"id":"jp-company","category":"company-data","endpoint":"POST /v1/jp-company","description":"Japanese company site -> standard profile: name, address, representative, founded, capital, business lines, employees, listing status, contact. A JP-tuned preset of /v1/structured","price_usd":{"per_call":0.03},"input":{"url":"string (company site URL; the corporate-profile page works best)"},"sample_output":"/samples/jp-company"},{"id":"document-pipeline","category":"documents","endpoint":"POST /v1/document-pipeline","description":"One call: PDF -> parse (hallucination-guarded OCR) -> invoice fields -> arithmetic verification -> optional issuer enrichment. Inputs validated before settlement; every stage outcome recorded honestly in stages{}","price_usd":{"flat_per_document":0.05},"limits":{"text_pdf_pages":20,"scanned_pages":3},"partial_failure":{"delivered_means":"parse stage succeeded","later_stage_failure":"recorded in stages{} and on the receipt"},"input":{"url":"string (PDF URL)","enrich":"bool (default false)"},"sample_output":"/samples/document-pipeline"},{"id":"pdf-merge","category":"documents","endpoint":"POST /v1/pdf-merge","description":"Merge 2-10 PDFs into one, in order. Deterministic","price_usd":{"per_call":0.003},"limits":{"total_input_mb":10},"input":{"urls":"array of 2-10 PDF URLs"}},{"id":"pdf-pages","category":"documents","endpoint":"POST /v1/pdf-pages","description":"Extract pages by range into a new PDF. Deterministic","price_usd":{"per_call":0.002},"input":{"url":"string (PDF URL)","pages":"1-based ranges, e.g. 1-3,7"}},{"id":"pdf-info","category":"documents","endpoint":"POST /v1/pdf-info","description":"PDF facts before paying for parsing: pages, metadata, per-page text volume, scanned-or-not estimate","price_usd":{"per_call":0.001},"input":{"url":"string (PDF URL)"},"sample_output":"/samples/pdf-info"},{"id":"meal-vision","category":"vision","endpoint":"POST /v1/meal-vision","description":"Meal photo -> itemized nutrition JSON: dishes, portion estimates, calories, protein/fat/carb with per-item confidence. v1.3: reference-object scale calibration (known-size table: chopsticks 23cm, cutlery, phone, plates; food-as-reference demoted as circular), scene-complexity detection with honest confidence downgrade, disclosed kcal range from a 14-photo labeled calibration, PFC energy-balance ratios vs guideline ranges, and an alcohol-aware deterministic 4/4/9 verification layer - estimates are never presented as measurements. v1.5: every call runs the analysis 3x and reports the median run with per-call kcal spread and item agreement (consensus disclosed)","price_usd":{"per_image":0.05},"typical_seconds":"8-15 (every call runs a 3-run consensus)","input":{"image_url":"string (or image_base64)","image_base64":"string (PNG/JPEG/WebP/GIF/BMP/TIFF, max 10MB)","hints":"optional context (e.g. cuisine, menu name)"},"note":"calibrated against 30 dietitian-portioned weighed meals: median error ~12-15%, disclosed kcal range contained the true value in 26/30. Portions from a single photo carry 20-40% typical error; the response says so. Not medical advice","sample_output":"/samples/meal-vision"},{"id":"portrait-analysis","category":"vision","endpoint":"POST /v1/portrait-analysis","description":"1-3 portraits -> personal color analysis in three published layers: MEASURED pixel colorimetry (CIELAB, ITA angle from cheek samples) cross-checked against vision-model attributes, cross-photo lighting consistency checks, and a deterministic rule table for the 4-season verdict (rule_trace shows every rule) with 12-subtone detail, all-4 season scores, and a structured palette where every hex carries a human-readable color name. Inconsistencies downgrade confidence honestly","price_usd":{"flat_1_to_3_images":0.05},"typical_seconds":"4-15 (1-3 photos)","input":{"image_url":"string (or image_base64; single-photo form)","images":"array of {image_url|image_base64}, max 3 - different lighting recommended","style":"feminine|masculine|neutral (advice wording only; the verdict is style-independent)"},"free_precheck":"POST /v1/portrait-precheck - free analyzability check (face detectable? photo quality?) before you pay. 10/hour/IP","rules_version_note":"responses carry rules_version; verdicts are reproducible per version and calibrations are logged in pricing/methodology notes","note":"analysis only: no identification, no biometric template, images processed in memory and not stored. If no face is detectable the response is ok:false face_not_detected (use the free precheck to avoid that charge)","sample_output":"/samples/portrait-analysis"},{"id":"style-profile","category":"vision","endpoint":"POST /v1/style-profile","description":"Integrated styling verdict in one call: seasonal color (measured colorimetry consensus + cross-photo checks), face-impression zone (published 2-axis geometry rules, on-device landmarks), body frame type (photo and/or questionnaire), and integration rules that compose the three layers (palette subset, taste, silhouette, hair/brow/beard modifiers). Every layer carries a rule trace and its own rules_version","price_usd":{"flat_per_call":0.05},"typical_seconds":"5-20 (photos + geometry layers)","input":{"images":"1-3 face photos [{image_url|image_base64}]","body_image_url":"optional full-body photo (frame layer)","questionnaire":"optional {gains_weight_first: upper|lower|even, wrist: bony|round|flat}","style":"feminine|masculine|neutral"},"note":"layers degrade honestly: missing body photo and questionnaire yields frame ok:false with reason; geometry engine unavailability is declared, never guessed. No identification; images not stored","sample_output":"/samples/style-profile"},{"id":"style-report","category":"vision","endpoint":"POST /v1/style-report","description":"The style-profile analysis rendered as a finished, client-ready PDF report (English or Japanese): cover, verdict table, palette swatches with color names, style-aware outfit formulas with concrete examples, two virtual draping boards with disclosed candidate conflicts, honest confidence. Returned as report_pdf_base64 + full profile JSON","price_usd":{"flat_per_call":2.99,"with_report_pack":"1.99/unit (10-pack 19.90)"},"typical_seconds":"6-25 (analysis + PDF rendering)","input":{"images":"1-3 face photos [{image_url|image_base64}]","style":"feminine|masculine|neutral","language":"en (default) | ja","name":"client name printed on the report","pack_code":"optional prepaid credit instead of payment (see report-pack)"},"note":"for agents serving human end-clients; images processed in memory, never stored","sample_output":"/samples/style-report"},{"id":"report-pack","category":"vision","endpoint":"POST /v1/report-pack","description":"Volume pricing for style-report: one payment of 19.90 returns 10 single-use credit codes (1.99/unit vs 2.99 single). Codes never expire and work for en and ja reports","price_usd":{"flat_per_call":19.9},"input":{},"note":"treat codes like cash; each is consumed on first accepted style-report call","sample_output":"/samples/report-pack"},{"id":"jp-payroll-net","category":"jp-statutory","endpoint":"POST /v1/jp-payroll-net","description":"Japan annual gross salary -> net take-home: social insurance (official Kyokai-Kenpo FY2026 grade table, all 47 prefectures), income tax (exact NTA Beppyo-5 4000-yen table + reconstruction surtax), resident tax (with adjustment credit). Deterministic; every response cites primary sources + rules_version; unverified rules are never billed","price_usd":{"per_call":0.02},"input":{"annual_gross_yen":"int","prefecture":"string (JP or romaji, e.g. tokyo)","age":"int (default 30)","annual_bonus_yen":"int optional","dependents":"object optional {general, specific, elderly, elderly_cohabit}","year":"int (default 2026)","as_of":"date optional"},"sample_output":"/samples/jp-payroll-net"},{"id":"jp-bonus-net","category":"jp-statutory","endpoint":"POST /v1/jp-bonus-net","description":"Japan bonus net pay: premiums (1000-yen floor, annual 5.73M health cap, per-payment 1.5M pension cap) + withholding tax from the official bonus rate table (rate determined by previous-month salary)","price_usd":{"per_call":0.01},"input":{"bonus_yen":"int","prefecture":"string","previous_month_after_si_yen":"int (needed for withholding tax)","dependents":"int 0-7","age":"int","ytd_bonus_yen":"int optional"},"sample_output":"/samples/jp-bonus-net"},{"id":"jp-social-insurance","category":"jp-statutory","endpoint":"POST /v1/jp-social-insurance","description":"Japan monthly social insurance premiums: official grade table (50 grades, official boundaries - not the midpoint approximation), health/long-term-care/pension/employment, official 50-sen rounding","price_usd":{"per_call":0.01},"input":{"monthly_remuneration_yen":"int","prefecture":"string","age":"int","as_of":"date optional"},"sample_output":"/samples/jp-social-insurance"},{"id":"jp-dependent-threshold","category":"jp-statutory","endpoint":"POST /v1/jp-dependent-threshold","description":"Japan income walls: tax wall derived from basic+salary deductions (not hardcoded), social-insurance walls time-versioned (wage requirement abolished 2026-10-01), spousal walls, student-dependent walls (1.5M/1.88M)","price_usd":{"per_call":0.02},"input":{"annual_income_yen":"int","year":"int","as_of":"date optional"},"sample_output":"/samples/jp-dependent-threshold"},{"id":"jp-consumption-tax","category":"jp-statutory","endpoint":"POST /v1/jp-consumption-tax","description":"Japan consumption tax: invoice totals with one rounding per rate, qualified invoice (T+13) validation, simplified taxation by business class, 20-percent special (date-gated, ends 2026-09-30)","price_usd":{"per_call":0.01},"input":{"mode":"invoice_totals|validate_invoice|simplified|two_percent","lines":"array (invoice_totals)","document":"object (validate)","taxable_sales_excl_yen":"int","category":"string 1-6"},"sample_output":"/samples/jp-consumption-tax"},{"id":"jp-business-days","category":"jp-statutory","endpoint":"POST /v1/jp-business-days","description":"Japan holidays (1980-2099, equinox + substitute + kokumin-no-kyujitsu), business-day arithmetic, statutory tax deadlines with holiday shift, wareki conversion","price_usd":{"per_call":0.003},"input":{"mode":"add|between|holidays|deadline|wareki","from":"date","days":"int","year":"int","kind":"deadline kind","base_date":"date","date":"date"},"sample_output":"/samples/jp-business-days"},{"id":"jp-overtime-wage","category":"jp-statutory","endpoint":"POST /v1/jp-overtime-wage","description":"Japan overtime premiums (Art.37: 25/35/50 percent + late-night, official kihatsu-150 rounding) and Article-36 special-clause limit check","price_usd":{"per_call":0.015},"input":{"mode":"pay|check36","monthly_salary_yen":"int","monthly_scheduled_hours":"number","hours":"object","monthly_overtime_hours":"array (check36)"},"sample_output":"/samples/jp-overtime-wage"},{"id":"jp-retirement-tax","category":"jp-statutory","endpoint":"POST /v1/jp-retirement-tax","description":"Japan retirement income tax: deduction by service years (40/70 per year, min 800k), half-taxation with short-term/officer exceptions, exact 1-yen withholding floor, resident tax 6+4 split each floored to 100 yen","price_usd":{"per_call":0.02},"input":{"payout_yen":"int","years_of_service":"int","is_officer":"bool","disability":"bool"},"sample_output":"/samples/jp-retirement-tax"},{"id":"jp-mortgage","category":"jp-statutory","endpoint":"POST /v1/jp-mortgage","description":"Mortgage: level-payment/level-principal schedules, total interest, prepayment effect (term or payment reduction). Pure deterministic annuity math","price_usd":{"per_call":0.005},"input":{"principal_yen":"int","annual_rate":"number (0.012 = 1.2%)","months":"int 1-1200","method":"string","prepayment":"object"},"sample_output":"/samples/jp-mortgage"},{"id":"jp-payslip-audit","category":"jp-statutory","endpoint":"POST /v1/jp-payslip-audit","description":"Audit a Japanese payslip: recompute health/care/pension/employment premiums and withholding tax from official tables, diff against actuals with 5-way verdicts. Explains grade revisions (teiji-kettei) and combined care notation instead of flagging them as errors; resident tax honestly not_auditable","price_usd":{"per_call":0.02},"input":{"prefecture":"string","age":"int","standard_monthly_yen":"int optional (known SMR)","payslip":"object {monthly_gross_yen, commuting_allowance_yen, health_yen, care_yen, pension_yen, employment_yen, income_tax_yen, resident_tax_yen, dependents, spouse, health_includes_care}"},"sample_output":"/samples/jp-payslip-audit"},{"id":"jp-crypto-tax","category":"jp-statutory","endpoint":"POST /v1/jp-crypto-tax","description":"Japan crypto-asset realized income under NTA rules: total-average (default for individuals) or moving-average, sell/spend/exchange as disposals, fees deductible, opening balances. Verified to the yen against all official NTA FAQ calculation examples. Optional incremental income-tax estimate","price_usd":{"per_call":0.05},"limits":{"transactions_per_call":300},"input":{"method":"total_average|moving_average","transactions":"array of {type: buy|sell|spend|exchange, ...}","opening":"array [{asset, qty, cost_jpy}] carry-over","other_taxable_income_yen":"int optional (enables tax estimate)"},"sample_output":"/samples/jp-crypto-tax"},{"id":"jp-payroll-suite","category":"jp-statutory","endpoint":"POST /v1/jp-payroll-suite","description":"Four Japan payroll calculations in one call: net salary + social insurance detail + income-wall analysis (+bonus withholding when previous-month salary given). Same inputs as jp-payroll-net","price_usd":{"flat_per_call":0.05},"input":{"annual_gross_yen":"int","prefecture":"string","age":"int","annual_bonus_yen":"int optional","previous_month_after_si_yen":"int optional","dependents":"object optional"},"sample_output":"/samples/jp-payroll-suite"}]}