Skip to main content
POST
Energy Converter

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ioValue
number

Amount

ioFromUnit
enum<string>

Convert from

Available options:
joule,
kilojoule,
megajoule,
gigajoule,
calorie,
kilocalorie,
watt_hour,
kilowatt_hour,
megawatt_hour,
gigawatt_hour,
british_thermal_unit,
therm,
foot_pound,
electronvolt,
kiloelectronvolt,
megaelectronvolt,
gigaelectronvolt,
erg,
tonne_of_oil_equivalent,
tonne_of_coal_equivalent,
barrel_of_oil_equivalent,
quad,
thermie,
horsepower_hour
ioToUnit
enum<string>

Convert to

Available options:
all,
joule,
kilojoule,
megajoule,
gigajoule,
calorie,
kilocalorie,
watt_hour,
kilowatt_hour,
megawatt_hour,
gigawatt_hour,
british_thermal_unit,
therm,
foot_pound,
electronvolt,
kiloelectronvolt,
megaelectronvolt,
gigaelectronvolt,
erg,
tonne_of_oil_equivalent,
tonne_of_coal_equivalent,
barrel_of_oil_equivalent,
quad,
thermie,
horsepower_hour
ioPrecision
enum<string>

Decimal precision

Available options:
0,
2,
4,
6,
8,
10

Response

Tool output

tool
string
required
tool_version
string
required

Output-contract version for this tool. Currently "1" for all tools.

outputs
object
required
credits_used
integer
required

Credits this call consumed, after any settlement refund. 0 when metering is disabled.

request_id
string
credits_remaining
integer | null

Credits left in the current monthly allowance, or null when metering is disabled.