← All tool references

Engineering · execute

Horsepower Calculator

Convert mechanical horsepower and watts or calculate power from work in joules completed over time.

Open public tool

Overview

Category
Engineering
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/horsepower-calculator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/horsepower-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

mode · string · required
Choose which calculation or conversion direction you need. Accepted values: watts_to_hp, hp_to_watts, work_rate.
value · number · required
Enter the value you want translated, converted, or used in the selected calculation mode.
time_seconds · number · optional
Enter the elapsed seconds used to calculate a work rate.
{
    "type": "object",
    "properties": {
        "mode": {
            "type": "string",
            "enum": [
                "watts_to_hp",
                "hp_to_watts",
                "work_rate"
            ],
            "description": "Choose which calculation or conversion direction you need."
        },
        "value": {
            "type": "number",
            "description": "Enter the value you want translated, converted, or used in the selected calculation mode."
        },
        "time_seconds": {
            "type": "number",
            "description": "Enter the elapsed seconds used to calculate a work rate."
        }
    },
    "required": [
        "mode",
        "value"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

horsepower · number
Browser-calculated horsepower.
watts · number
Browser-calculated watts.
{
    "type": "object",
    "properties": {
        "horsepower": {
            "type": "number",
            "description": "Browser-calculated horsepower."
        },
        "watts": {
            "type": "number",
            "description": "Browser-calculated watts."
        }
    },
    "additionalProperties": false
}

One mechanical horsepower in watts

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/horsepower-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "watts_to_hp",
    "value": 745.6998720000000275831553153693675994873046875
}'
{
    "ok": true,
    "data": {
        "slug": "horsepower-calculator",
        "result": {
            "values": {
                "horsepower": 1,
                "watts": 745.6998999999999568899511359632015228271484375
            },
            "display": {
                "display": "1"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.