Skip to content
BetaPrice computation as a service

Price computation as a service.

Send a product context (a SaaS plan, a SKU, an API call, a marketplace order) and get back the right price. Route between rules, ML, LLM prompts, or your own function. Pay only per inference.

  • One POST per pricing decision. No redeploys
  • Built-ins for SaaS, commerce, marketplaces, AI APIs
  • Swap pricing logic without shipping new code
  • Sub-300ms median compute on built-in functions

Live /api/compute/price

Demo tenant
Compute usually takes < 300 ms.
Responsecached example
{
  "request_id": "req_demo_0001",
  "function_id": "fn_jale_optimizer",
  "function_name": "lastprice/jale-optimizer",
  "computed_price": 49,
  "currency": "USD",
  "confidence": 0.87,
  "explanation": "Optimum at price elasticity = -1.2",
  "alternatives": [
    {
      "price": 47,
      "confidence": 0.81,
      "label": "conservative"
    },
    {
      "price": 52,
      "confidence": 0.74,
      "label": "aggressive"
    }
  ],
  "metering": {
    "input_units": 142,
    "output_units": 38,
    "compute_duration_ms": 211,
    "cost": 0.00256
  },
  "metadata": {
    "model_version": "jale-1.4.2",
    "routing_reason": "explicit",
    "cached": false
  }
}
15
Built-in functions
7
Routing strategies
9
Inference adapters
6
Live demo apps

What you actually use

A dashboard, a playground, a function catalog.

Every pricing call is observable, every function is browseable, every request can be replayed from the playground. Schematic previews; open the app for the real thing.

app.lastprice.dev / overview
Dashboard: call volume, p95 latency, cost per call, top functions.
app.lastprice.dev / playground
Playground: POST a context, inspect the JSON response and metering side-by-side.

What you can do with it

One endpoint. Every pricing decision.

Stop redeploying every time pricing changes. Treat pricing like inference: call it, meter it, route it, replace it.

  • Connect anything

    Rule engine, ML model, LLM prompt, external API, or composite. Any pricing function fits behind one endpoint.

  • Route by intent

    Seven strategies (cheapest, fastest, weighted, policy + fallback chains) with per-function circuit breakers.

  • Meter at the call

    Input + output units measured per request. Costs computed by the same helper the router uses, so values cannot drift.

  • Get paid for pricing

    Publish a function to the marketplace and earn revenue automatically every time another tenant calls it.

How it works

From signup to first price in five steps.

The last two are optional. Built-in functions work out of the box.

  1. 1

    Sign up

    Tenant provisioned automatically. No credit card for the playground.

  2. 2

    Issue an API key

    Scoped lp_… keys (read · write · admin). JWTs also supported.

  3. 3

    Call /api/compute/price

    Built-in functions work out of the box when function_id is omitted.

  4. 4

    Register your own (optional)

    Rule engine, ML model, LLM prompt, external API, or composite.

  5. 5

    Pick a routing policy (optional)

    cheapest, fastest, weighted, or fallback chains with a circuit breaker.

Built for developers

One POST. Done.

Authenticate with a scoped API key. Send a product context. Get a price, confidence, alternatives, and metered cost back, every time, with the same shape.

  • Typed SDKs for TypeScript and Python, generated from OpenAPI 3.0.
  • Scoped lp_… keys (read · write · admin) and JWTs.
  • Sub-300ms median compute on built-in functions.
curl -X POST https://lastprice.dev/api/compute/price \
  -H "Authorization: Bearer $LP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "context": {
      "product_id": "plan_pro_monthly",
      "product_type": "saas",
      "current_price": 49,
      "currency": "USD"
    },
    "options": { "include_explanation": true, "include_alternatives": true }
  }'

Built-in functions

First-party pricing logic, ready to call.

Each function carries a cost_multiplier that weights its metered units.

See the catalog
  • Jale Price Optimizer

    lastprice/jale-optimizer
    2×

    Find the revenue-maximising price given your demand signal.

    pricingoptimizationelasticitybuilt-in
  • Jale Elasticity Calculator

    lastprice/jale-elasticity
    1×

    Estimate price elasticity from historical orders.

    elasticitystatisticsbuilt-in
  • Jale Advanced Recommendation

    lastprice/jale-advanced
    5×

    Multi-objective optimisation across margin, conversion, retention.

    recommendationadvancedbuilt-in
  • Elo A/B Test Engine

    lastprice/elo-ab-test
    1×

    Deterministic SHA-256 hash routing for price experiments.

    ab-testingvariant-assignmentbuilt-in
  • Jale Psychological Pricing

    lastprice/jale-psychological
    1×

    Charm pricing, anchoring, decoy variants.

    psychologicalpricingconversionbuilt-in
  • Rosetta Translate

    lastprice/rosetta-translate
    3×

    AI-assisted protocol translation with hard contracts. Plans a mapping from any merchant schema to the canonical core, then compiles + validates the outbound vendor payload. Powered by @packages/translator.

    translationmappingcanonicalrosetta
  • Rosetta Normalize

    lastprice/rosetta-normalize
    2×

    Vendor response normalization. Inverts a Rosetta mapping plan to project a vendor response back into the merchant canonical shape, plus extract Tier 3 passthrough fields.

    translationnormalizecanonicalrosetta
  • Rosetta Validate

    lastprice/rosetta-validate
    1×

    Standalone contract validation. Runs the Rosetta validator over a candidate payload (or a compiled mapping output) and returns pass/fail plus structured diagnostics, without invoking the suggester or compiler.

    translationvalidationcontractrosetta
  • Rosetta Suggest

    lastprice/rosetta-suggest
    2×

    Schema-mapping suggestion only. Runs the heuristic / LLM suggester over a source schema and canonical target to draft a mapping plan with per-field confidence — no compilation, no validation. Designed for the Mapping Studio "draft from samples" flow.

    translationsuggestermappingrosetta
  • Rosetta Freeze

    lastprice/rosetta-freeze
    1×

    Promote a reviewed Rosetta mapping plan to a frozen, hash-pinned adapter. Closes the canonical → suggester → compiler → validator → normalizer → review → freeze lifecycle so production callers can pin a known-good mapping.

    translationfreezemappingrosetta
  • Rosetta Ingest

    lastprice/rosetta-ingest
    3×

    Autonomous merchant onboarding. One call: fingerprints the payload shape, looks up a frozen adapter by (tenant, fingerprint, canonical_target), and on a cache miss infers the source schema, suggests a mapping, and either auto-freezes (high confidence), translates best-effort and queues a review (medium), or refuses to guess and returns a review_id (low). Drift re-runs the same pipeline.

    translationingestonboardingmapping
  • Elo Significance

    lastprice/elo-significance
    1×

    Sequential significance testing for A/B pricing experiments (SPRT and Bayesian posterior). Returns whether the variant difference is significant, the test statistic, and a recommended action (continue / stop-winner / stop-loser).

    ab-testingstatisticssignificancesprt
  • Elo Bandit Allocator

    lastprice/elo-allocator
    2×

    Multi-armed bandit traffic allocation for A/B pricing experiments (Thompson sampling / epsilon-greedy). Returns per-variant traffic weights that adapt to observed reward, replacing fixed splits when you want to minimize regret.

    ab-testingbanditallocationthompson-sampling
  • Jale Bundle Pricing

    lastprice/jale-bundle
    3×

    Optimize bundle pricing across multiple SKUs. Accounts for cross-elasticities, anchor effects, and component substitution to recommend a bundle price (and optional tiered discounts) that maximize expected revenue.

    pricingbundlecross-elasticityjale
  • Jale Tier Optimizer

    lastprice/jale-tier-optimizer
    3×

    Optimize price points across a tiered catalog (e.g. SaaS plan ladder). Solves for tier prices that maximize revenue subject to monotonicity and willingness-to-pay constraints across segments.

    pricingtiersoptimizationsegmentation

Routing & resilience

7 strategies. One circuit breaker per function.

Pin requests, race for cost, race for latency, weight a split, or fall back through a chain. Per-function circuit breakers protect the rest of the graph.

ClosedOpenHalf-open
  • explicit

    Pin a request to a specific function.

  • cheapest

    Lowest cost_per_unit × cost_multiplier wins.

  • fastest

    Lowest p95 latency wins.

  • round_robin

    Even load across eligible functions.

  • weighted

    Traffic split by configured weights.

  • policy

    Per-tenant policy with fallback_chain.

  • default

    Tenant-default policy + fallback chain.

Inference adapters

Bring your provider, or use any of 9 built-in.

  • OpenAI
  • Anthropic
  • Hugging Face
  • Replicate
  • Together AI
  • Baseten
  • OpenRouter
  • Apify
  • NVIDIA AITune

Use cases

Wherever a price has to be decided.

  • SaaS

    Tier optimization

    Test pricing tiers, packaging, and discount schedules without redeploying.

  • Commerce

    Dynamic SKU pricing

    Adjust prices to demand, inventory, and competitor signal, per request.

  • AI / API

    Per-call monetization

    Bill API calls in input + output units. HTTP 402 supported for agent flows.

Demo apps

6 apps wired to Last Price.

Each one runs a real pricing experiment. Open any app; the prices you see were computed by a function on the network.

View gallery
  • Live

    CloudNote (SaaS Pricing)

    Subscription pricing for a SaaS tier matrix.

    Launch demo
  • Live

    AgentBank (AI Agent Banking)

    AI-agent banking with HTTP 402 paywalled actions.

    Launch demo
  • Live

    CloudAI (AI API Platform)

    API usage pricing per call.

    Launch demo
  • Live

    ModernGoods (E-commerce)

    E-commerce SKU pricing.

    Launch demo
  • Live

    SkillHub (Marketplace)

    Marketplace commission pricing.

    Launch demo
  • Live

    LearnFast (Digital Products)

    Course / content monetization.

    Launch demo

Marketplace

List your pricing function. Get paid per inference.

Publish a function to the marketplace and earn revenue every time another tenant calls it. Revenue is recorded automatically per compute call. See the public catalog for what’s already listed.

Pricing

Token-based. Pay per inference unit.

You pay for input units + output units the function consumes per compute call, multiplied by the function’s cost_multiplier. No seats. No minimums. No surprises.

  • Free playground tenant. No card required
  • Same formula in marketing, app, and router
  • Marketplace revenue accrues per call, automatically
See full pricing

Worked example

live formula
metering.input_units      = 142
metering.output_units     = 38
function.cost_per_unit    = $0.005
function.cost_multiplier  = 2×
─────────────────────────────────────────
metering.cost             = $0.002560

Computed live from computeMeteringCost in packages/pcnusing the Jale optimizer’s built-in cost_per_unit and cost_multiplier = 2×. The marketing site, the dashboard, and the inference router all share the exact same helper.

Get started

Compute your last price.

Open the app, browse the marketplace, or read the spec. The playground above runs the same compute pipeline your tenant will: same router, same metering, same response shape.