Valuation & ownership · Loan & Payments

Auto Loan Calculator API

One GET returns the amortized monthly payment, total interest, total paid and per-year interest split for an auto loan. It is deterministic arithmetic over your own inputs: no vehicle lookup, no rate shopping, no upstream call. The detail worth having is how it treats a trade-in — negative equity is financed rather than subtracted, which is the case most payment calculators model backwards and the one that costs a buyer real money.

GET/v1/vehicles/loan5 s route budget

Get an API keyFull parameter reference

What comes back

amountFinanced (principal after down payment, rebate and trade equity, plus any financed fees), monthlyPayment, totalInterest, totalPaid, interestByYear (interest per 12-month block, summing to totalInterest, with a partial final year as a stub), tradeInEquity (value minus payoff, negative when underwater), an echo of apr and months, source "carscrape" and the standard meta envelope with coverageStatus "complete" — the one endpoint on the API that can honestly claim complete coverage, because it computed everything it returned rather than observing it.

Request
curl -sS -G https://api.vehicles.dev/v1/vehicles/loan \
  -H "Authorization: Bearer $VEHICLES_API_KEY" \
  -d price=35000 -d down_payment=5000 -d apr=0.069 -d months=60
200 · $30,000 financed at 6.9% over 60 months
{
  "amountFinanced": 30000.0,
  "apr": 0.069,
  "interestByYear": [1907.47, 1536.82, 1139.77, 714.43, 258.81],
  "monthlyPayment": 592.62,
  "months": 60,
  "source": "carscrape",
  "totalInterest": 5557.29,
  "totalPaid": 35557.29,
  "tradeInEquity": 0.0
}

The complete parameter table, the response-field dictionary and the per-endpoint error codes live in the reference: full parameter reference for /v1/vehicles/loan.

What it is actually built on

The amount financed is the price, plus any fees you roll in, minus the down payment, minus the rebate, minus trade-in equity — where trade-in equity is the trade's value minus its payoff and is allowed to be negative. That principal is then amortized at the nominal monthly rate over the term using the standard level-payment formula, with a zero-rate loan handled as a straight-line split rather than a divide by zero. Interest is accumulated one period at a time rather than from a closed form, which is what lets the per-year split and the total reconcile exactly, and the final period absorbs accumulated rounding so the balance lands on zero instead of a stray cent. Nothing is cached because nothing is fetched; the whole call is arithmetic.

Data source
Nothing. This is deterministic arithmetic over the values you send: no vehicle lookup, no rate shopping, no upstream call.
Route budget
5 s
Billed per
calculation, successful responses only
MCP tool
get_loan_payments

Limits: what this endpoint will not do

There is no data here at all, and that is the point: this is deterministic arithmetic over the values you send. It does not look up the vehicle, it does not shop rates, and it will not tell you what APR a buyer qualifies for — you must supply the rate you were quoted. apr is the nominal annual rate compounded monthly, which is how US auto loans quote and amortize; it is not an APR in the Regulation Z sense that folds in finance charges, so a loan with financed fees will have a true disclosed APR above the rate you pass. The schedule assumes a level monthly payment, a fixed rate for the whole term, no prepayment and no balloon. Terms are capped at 120 months and prices at $10,000,000. Excluded by design: gap insurance, extended service contracts, lender-specific fees, and any tax or registration cost — pass those through fees if you want them financed, or use the tax endpoint to size them first. Because nothing is looked up, there is no not-found case and no upstream to fail. The endpoint is available now and successful responses use the published catalog rate. Standard plans include no SLA.

What teams build with it

Payment display on listings and finance widgets

A marketplace or dealer site showing a monthly payment next to every listing needs one authoritative calculation rather than a copy of the formula in each client. Pair it with the valuation endpoint for the price and the tax endpoint for the fees, and the payment shown on the listing, in the finance widget and on the deal sheet all agree because they came from the same place.

Honest trade-in and negative equity flows

A trade-in appraisal flow that already knows the customer's payoff can show the real payment consequence of rolling negative equity forward, rather than quietly ignoring it and quoting a payment the customer will not be offered. tradeInEquity in the response makes the shortfall explicit so the UI can name it.

Term comparison in lending tools

A lender or credit union comparing term options generates the payment and total interest for 48, 60, 72 and 84 months in four calls and shows the total-interest column next to the payment column — which is the comparison that actually informs the choice and the one longer terms hide.

Payment questions in an AI shopping assistant

An AI assistant answering "what would my payment be" can call the MCP tool with the user's quoted rate instead of doing arithmetic in-context, where a dropped compounding step is invisible. Because the tool refuses to invent a rate, the agent is pushed to ask for the quote rather than fabricate one.

Integrating it properly

The reference ships the bare curl. This is the shape worth deploying: a typed client that branches on the RFC 9457 code slug rather than the human-readable title, and retries only the codes this endpoint marks retryable.

TypeScript
const API = "https://api.vehicles.dev";

// Only these codes are marked retryable for this endpoint. Everything else is terminal.
const RETRYABLE = new Set([]);

export async function getLoanPayments(params: Record<string, string>, attempt = 0): Promise<GetLoanPaymentsResponse> {
  const response = await fetch(
    `${API}/v1/vehicles/loan?${new URLSearchParams(params).toString()}`,
    {
      headers: {
        Accept: "application/json",
        Authorization: `Bearer ${process.env.VEHICLES_API_KEY ?? ""}`
      },
      // The route budget is 5 s; allow it plus headroom.
      signal: AbortSignal.timeout(10_000)
    }
  );

  if (response.ok) return (await response.json()) as GetLoanPaymentsResponse;

  // Failures are application/problem+json. Branch on `code`, never on the human-readable title.
  const problem = (await response.json()) as { code: string; detail?: string };
  if (RETRYABLE.has(problem.code) && attempt < 3) {
    await new Promise((resolve) => setTimeout(resolve, 250 * 2 ** attempt));
    return getLoanPayments(params, attempt + 1);
  }
  throw new Error(`${response.status} ${problem.code}: ${problem.detail ?? ""}`);
}

How to check it is behaving

The route enforces a 5-second upstream budget, so a slow dependency returns a problem document instead of holding your request open. Billing is success-only: failed calls release their reservation, so you can measure error rates and hold-out accuracy against your own data without paying for the failures. Usage is visible per endpoint in the dashboard.

What this one endpoint costs

Priced per calculation. The platform fee buys throughput and endpoint access; the unit price covers the data work. Worked at 250,000 successful calls a month so you can see where the plans cross over — the full price matrix is in the reference.

Auto Loan Calculator API pricing by plan
PlanPlatform feeRate limitPer calculation250,000 / month
Starter$0 / mo5 rps$0.001$250$250 usage + platform fee
Pro$299 / mo10 rps$0.0007$474$175 usage + platform fee
Scale$599 / mo50 rps$0.0005$724$125 usage + platform fee

Eligible for the Starter plan's included monthly calls; past those it draws on your credit balance. Data fees are prepaid from credits on every plan: when included calls and credits cannot cover a call you get 402 insufficient_credits rather than an overage bill. Published rates are active and apply only to successful responses. Standard plans include no SLA.

Questions engineers actually ask

What happens when the trade-in is worth less than what is owed on it?

It is financed, not subtracted. When trade_in_payoff exceeds trade_in_value the shortfall is rolled into the loan, so a $4,000 trade with a $9,000 payoff on a $35,000 car finances $40,000, not $30,000. This is the single most common modelling error in payment calculators and it understates the loan by twice the negative equity if you get the sign wrong. tradeInEquity comes back in the response so you can show the number rather than burying it.

How do I pass the interest rate?

A decimal, not a percentage: 0.069 means 6.9%. It is the nominal annual rate compounded monthly, matching how US auto loans are quoted and amortized. It is deliberately required rather than defaulted, because a payment calculator that invents a rate produces a number the user will treat as a quote.

What is interestByYear for?

interestByYear splits the total interest into 12-month blocks, so a 60-month loan returns five entries and a 30-month loan returns three — the last being a partial-year stub. The entries always sum to totalInterest, because interest is accumulated period by period from the same schedule the payment comes from rather than from a separate closed form that could drift.

What if the down payment covers the whole price?

You get a zero loan rather than a negative one: amountFinanced, monthlyPayment and totalInterest all come back as 0 with a note explaining that the down payment, rebate and trade equity cover the price. That is a legitimate cash purchase, not an error, so it is a 200 rather than a 400.

What does it cost?

It is the cheapest call on the API, because it makes no upstream request at all — it shares Starter's 1,000-call monthly allowance, then costs $0.001 per call on Starter, $0.0007 on Pro and $0.0005 on Scale. That said, if you are recalculating on every slider drag in a payment widget, do the arithmetic client-side and use this for the authoritative server-side figure.

Where to go next

Most integrations chain two or three of these. The ones that pair with auto loan calculator api most often:

The reference entry for this endpoint — Loan & Payments in the API documentation — carries the parameter constraints, defaults, response fields and the full error table with retryable flags. Agents can reach the same endpoint as the get_loan_payments tool on the vehicles-dev-mcp MCP server, and the machine-readable contract is published at https://api.vehicles.dev/openapi.json.

Browse the rest of the catalog on the Vehicle data APIs hub.