Skip to content

Bring your own AI

Price the plan for customers who bring their own AI.

Your users can now sign in with their own AI subscription or key and pay for the model themselves. Tell Last Price who pays for inference, and it prices that tier from your real cost, so you can charge less and keep your margin.

What you can do

  • Declare model spend per unit as inference_cost, separately from the rest of your cost.
  • Set inference_payer to customer when the end customer pays for the model, and that spend drops out of the price.
  • Offer a cheaper bring-your-own plan at the same margin, or keep the price and give more usage.
  • Send bring-your-own requests to a pricing function of their own with a routing policy rule.
  • See in every explanation whether inference cost was included or excluded.

Your standard plan

request
POST /api/compute/price
{
  "function_id": "<lastprice/cost-plus id>",
  "routing_preference": "explicit",
  "context": {
    "currency": "USD",
    "metadata": {
      "unit_cost": 1,
      "inference_cost": 15,
      "target_margin_pct": 25
    }
  }
}
// computed_price: 21.33 (your plan, you pay for the model)

The bring-your-own tier

request metadata
"metadata": {
  "unit_cost": 1,
  "inference_cost": 15,
  "target_margin_pct": 25,
  "inference_payer": "customer"
}
// computed_price: 1.33 (same margin, the customer pays for the model)

Route it to its own function

routing policy rule
{
  "field": "context.metadata.inference_payer",
  "operator": "eq",
  "value": "customer",
  "function_id": "<your bring-your-own tier function>"
}

Ready to try it?

Spin up a free playground tenant in under a minute. No credit card.