Price computation as a service.
Your agent or app sends a product context (a SaaS plan, a SKU, an API call, a marketplace order) and gets back a price it can act on. Route between rules, ML, LLM prompts, or your own function. Pay only per inference.
- One
POSTper pricing decision. No redeploys - Built-ins for SaaS, commerce, marketplaces, AI APIs
- Agents get a key with one call:
POST /api/agents/register - Sub-300ms median compute on built-in functions
Live /api/public/compute/demo
No key needed{
"request_id": "req_demo_0001",
"function_id": "fn_jale_optimizer",
"function_name": "lastprice/jale-optimizer",
"computed_price": 24.99,
"currency": "USD",
"confidence": 0.85,
"explanation": "Optimized from $49 to $24.99 using elasticity-based revenue maximization. Price range evaluated: $24.50-$98.00.",
"alternatives": [
{
"price": 31.99,
"confidence": 0.7,
"label": "aggressive"
}
],
"metering": {
"input_units": 109,
"output_units": 61,
"compute_duration_ms": 71,
"cost": 0.00146
},
"metadata": {
"model_version": "v1",
"routing_reason": "explicit",
"cached": false
}
}Watch it work
See it price things, on a phone and between agents.
Two short screen recordings: the phone app pricing things from photos, and agents that price their own work and check each other's quotes.
The phone app in a minute · 1:02
The short cut of the walkthrough: from a few photos to a price you can share, then live tags and History.
Agents and prices in a minute · 0:57
The short cut of the agent demo: an agent signs itself up, prices its work, and a buyer agent catches a quote that is too high.
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.


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 no account to first price in five steps.
An agent can do every step itself. The last two are optional; built-in functions work out of the box.
- 1
Get a key
An agent calls POST /api/agents/register and gets a sandbox key back, no person needed. People sign up in the app instead.
- 2
Scope it
lp_… keys carry only what they may do, such as price:compute or pcn:function:read. JWTs also supported.
- 3
Call /api/compute/price
Built-in functions work out of the box when function_id is omitted.
- 4
Register your own (optional)
Rule engine, ML model, LLM prompt, external API, or composite.
- 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 (for exampleprice:compute) and JWTs. - Sub-300ms median compute on built-in functions.
curl -X POST https://api.last-price.ai/api/compute/price \
-H "x-api-key: $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 }
}'import { LastPrice } from "@lastprice/sdk"
const lp = new LastPrice({ apiKey: process.env.LP_API_KEY! })
const result = await lp.compute({
context: {
product_id: "plan_pro_monthly",
product_type: "saas",
current_price: 49,
currency: "USD",
},
options: { include_explanation: true, include_alternatives: true },
})
console.log(result.computed_price, result.metering.cost)import os
from lastprice import LastPrice
lp = LastPrice(api_key=os.environ["LP_API_KEY"])
result = lp.compute(
context={
"product_id": "plan_pro_monthly",
"product_type": "saas",
"current_price": 49,
"currency": "USD",
},
options={"include_explanation": True, "include_alternatives": True},
)
print(result.computed_price, result.metering.cost)Built-in functions
18 pricing functions, ready to call.
Each function carries a cost_multiplier that weights its metered units. A few are below; the catalog has all of them.
- 1×
Cost-Plus (no incumbent price required)
lastprice/cost-plusPrice from a declared unit cost and target margin, or from a supplied price band, for callers with no existing price to price against. Refuses rather than inventing a price when given no basis.
pricingcold-startagentsbuilt-in - 1×
Competitive Price with Business Floor
lastprice/competitive-priceEvaluate a caller-supplied competitor offer against a stated match or undercut goal and a cost, margin or minimum-price floor. Requests missing inputs rather than inventing them.
pricingcommercecompetitoragents - 1×
Optimal Stopping Rule
lastprice/stopping-ruleDecide whether one more round of negotiation is worth it. Fits a geometric decay to the improvement per round in your offer history, compares the expected gain from the next round with its cost (metered, or your own estimate), and returns stop or continue, the best offer so far, where continuing stops paying, and whose economics force the stop. Refuses rather than inventing a gain when given no history or prior.
negotiationdecisionoptimal-stoppingagents - 2×
Jale Price Optimizer
lastprice/jale-optimizerFind the revenue-maximising price given your demand signal.
pricingoptimizationelasticitybuilt-in - 3×
Jale Tier Optimizer
lastprice/jale-tier-optimizerOptimize 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 - 1×
Elo Significance
lastprice/elo-significanceBayesian significance test for A/B pricing experiments. Call POST /api/compute/significance with each variant's trials and conversions: it returns each variant's chance of being best, expected loss and 95% credible interval, and a verdict of winner, equivalent or continue; with two variants it adds Wald's sequential probability ratio test.
ab-testingstatisticssignificancesprt
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.
explicitPin a request to a specific function.
cheapestLowest cost_per_unit × cost_multiplier wins.
fastestLowest p95 latency wins.
round_robinEven load across eligible functions.
weightedTraffic split by configured weights.
policyPer-tenant policy with fallback_chain.
defaultTenant-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 comes with a pricing experiment. The gallery shows what each app prices and how it calls Last Price.
CloudNote (SaaS Pricing)
Subscription pricing for a SaaS tier matrix.
AgentBank (AI Agent Banking)
AI-agent banking with HTTP 402 paywalled actions.
CloudAI (AI API Platform)
API usage pricing per call.
ModernGoods (E-commerce)
E-commerce SKU pricing.
SkillHub (Marketplace)
Marketplace commission pricing.
LearnFast (Digital Products)
Course / content monetization.
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.
create_marketplace_listing. New listings go live after review.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.
- Free playground tenant. No card required
- Same formula in marketing, app, and router
- Marketplace revenue accrues per call, automatically
Worked example
live formulametering.input_units = 142
metering.output_units = 38
function.cost_per_unit = $0.005
function.cost_multiplier = 2×
─────────────────────────────────────────
metering.cost = (input_units × cost_per_unit × 0.001
+ output_units × cost_per_unit × 0.003)
× cost_multiplier
= $0.002560Computed live from computeMeteringCost, the metering formula, using 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.
Platform · Features
Built for the whole pricing lifecycle.
One platform from the first signal to the final invoice, every part of it reachable over the API and MCP as well as the dashboard.
Routing policies
Seven strategies, weights, fallback chains.
Learn moreSignals
Anomaly detection across price and demand.
Learn moreExperiments
Stable A/B variant assignment via Elo, with significance and bandits.
Learn moreCost tracing
Per-call cost, computed by the canonical helper.
Learn moreWebhooks
HMAC-SHA256 signed events for every step.
Learn morePrice intelligence
Continuous competitor scrape with reliability scores.
Learn moreCompute
Managed runtime with model profiling and GPU support.
Learn moreCredits & billing
Credits, invoices, payments, disputes, settled per call.
Learn more
Get started
Compute your last price.
Point your agent at the sign-in guide, open the app, or read the spec. The playground above runs the same compute pipeline your workspace will: same router, same metering, same response shape.