AVNISH AI
Back to calculators
Developer documentation

Calculator API

Integrate selected Friendly Calculator calculators into an application using a server-side API key. Access is currently issued manually for approved enquiries.

API gateway active HTTPS JSON

Keep your API key private. Send requests from your own backend, never from browser JavaScript, public repositories or mobile app source code. Do not share API keys in support messages.

Endpoint

POST

https://gtuycqunlihegsbvvsol.supabase.co/functions/v1/calculator-api

Required header:

x-api-key: avsk_live_YOUR_PRIVATE_KEY
Content-Type: application/json

Available calculators

CalculatorInput fields
gstamount, rate, optional mode (exclusive or inclusive)
emiprincipal, annualRate, months
fdprincipal, annualRate, years, optional frequency (1, 2, 4 or 12; default 4)
discountprice, discountPercent
profit-losscostPrice, sellingPrice

Example request — EMI

curl -X POST \
  'https://gtuycqunlihegsbvvsol.supabase.co/functions/v1/calculator-api' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_PRIVATE_API_KEY' \
  -d '{
    "calculator": "emi",
    "inputs": {
      "principal": 500000,
      "annualRate": 9.5,
      "months": 60
    }
  }'

Example response

{
  "ok": true,
  "calculator": "emi",
  "result": {
    "monthlyEmi": 10501.0,
    "totalPayment": 630060.0,
    "totalInterest": 130060.0
  }
}

The numbers above are illustrative. Actual responses depend on the submitted values.

Rate limits and errors

HTTP statusMeaning
200Request processed successfully.
400Invalid input or unsupported calculator.
401Missing, invalid, expired or revoked API key.
429Per-key requests-per-minute limit reached.
500 / 503Temporary service or backend configuration issue.

Each API key has an assigned per-minute request limit. Keys can be revoked. Do not assume unlimited availability; the service is subject to free-tier platform quotas and operational limits.

Request access

Tell us about your application and expected usage. Never include a password, OTP, existing API key or other secret in the enquiry.

Request API access