Documentation sections
Quickstart
Three steps: get a key, call the endpoint, use the result. The call beside this text is a link budget; any calculator works the same way.
Three steps
- Get an API key. A free key on your dashboard covers 5 calls a month. Pro ($9 a month) covers 100 and API ($19 a month) 10,000; see pricing. A program can get its user a key without a paste: see the device grant.
- Call the endpoint. POST to
/api/py/v1/calculatewith aslugand itsinputs, and your key in theX-API-Keyheader. - Use the result. Read
valuesby output key, checkwarningsanderrors, and keepprovenanceif you need to say how a figure was computed.
Keep the key out of your code
The examples read the key from RFTOOLS_API_KEY. The Python library also reads the key that rftools login saved, so a script never holds it.
Shell
export RFTOOLS_API_KEY=rfc_…
# or, with the Python library installed:
rftools loginInputs and units
Each calculator takes its inputs in the units its page shows, by the keys its reference lists, with their ranges and defaults. Send every input: most are required, and a call without one is refused (400) and costs nothing; one a calculator can do without takes the default its reference shows. The provenance lists every input the values were computed from.
Next
- Try a request in the browser with your key.
- Errors: what each status means and what the SDK raises.
- Quotas and limits: the monthly allowance and the per-minute limits.