Thermal Calculator REST API Documentation

The Thermal Calculator API allows you to calculate missing thermal parameters for IC design. Provide any three of Junction Temperature, Power Consumption, Ambient Temperature, ThetaJA, and optionally Case Temperature and ThetaJC, to compute the missing values.

Base URL

https://www.promptbox.cn/api/temp.php

HTTP Method

POST (recommended) or GET

The API accepts both JSON payloads (POST) and query parameters (GET). POST with JSON is recommended for cleaner integration.

Request Parameters

Parameter Type Unit Required Description
junction_temperature float °C No IC junction temperature
power_consumption float W No Total IC power consumption
ambient_temperature float °C No Ambient operating temperature
thetaJA float °C/W No Junction-to-ambient thermal resistance
case_temperature float °C No Case temperature
thetaJC float °C/W No Junction-to-case thermal resistance
At least 3 ambient-related parameters (junction_temperature, power_consumption, ambient_temperature, thetaJA) are required.
At least 1 case-related parameter (case_temperature or thetaJC) is required if you want case results.

Response

The API returns JSON with computed values.

Field Type Description
junction_temperature float/string Calculated or provided Junction Temperature (°C)
power_consumption float/string Calculated or provided Power Consumption (W)
ambient_temperature float/string Calculated or provided Ambient Temperature (°C)
thetaJA float/string Calculated or provided ThetaJA (°C/W)
case_temperature float/string Calculated or provided Case Temperature (°C)
thetaJC float/string Calculated or provided ThetaJC (°C/W)
error string|null Error message if invalid input or insufficient parameters

Examples

POST Example (JSON)

curl -X POST https://www.promptbox.cn/api/temp.php \ -H "Content-Type: application/json" \ -d '{ "junction_temperature": 125, "ambient_temperature": 85, "thetaJA": 25 }'

GET Example (Query Parameters)

https://www.promptbox.cn/api/temp.php?junction_temperature=125&ambient_temperature=85&thetaJA=25

Sample Response

{ "junction_temperature": 125, "power_consumption": 1.6, "ambient_temperature": 85, "thetaJA": 25, "case_temperature": null, "thetaJC": null, "error": null }

Error Handling

If input values are missing or invalid, the API will return an error field with a description.

Example

{ "junction_temperature": null, "power_consumption": null, "ambient_temperature": null, "thetaJA": null, "case_temperature": null, "thetaJC": null, "error": "Ambient Thermal: Please provide at least three values." }