Happytails.ai /DevelopersAPI v1
API reference

Pressure

Convert between pascals, kilopascals, bar, atmospheres, and psi.

POST/api/v1/tools/pressure/run

Base URL: https://happytails.ai · public API not connected

Overview

Convert between pascals, kilopascals, bar, atmospheres, and psi.

All API requests process supplied data on the server.

Request parameters

Send a JSON object. Unknown properties are rejected. Omitted options use the defaults below; enter numbers and booleans as JSON values, not quoted text.

No text input is needed. Use the settings below.

This endpoint does not accept a files array.

Options

options.valuenumber

Value

Default: 1.0

options.fromstring

From

Default: "Pa" · Allowed: Pa, kPa, bar, atm, psi

options.tostring

To

Default: "kPa" · Allowed: Pa, kPa, bar, atm, psi

Success response

HTTP 200 returns tool and result. Text is in result.text; parsed JSON may also appear in result.data. Generated files are in result.files with name, mime, bytes and base64. Decode the bytes before saving. Empty file arrays and null text are valid for operations returning another result type.

Complete output schema
{
  "type": "object",
  "required": [
    "tool",
    "result"
  ],
  "properties": {
    "tool": {
      "type": "string"
    },
    "result": {
      "type": "object",
      "required": [
        "text",
        "files"
      ],
      "properties": {
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "data": {
          "description": "Parsed JSON when the textual result is JSON."
        },
        "name": {
          "type": "string"
        },
        "mime": {
          "type": "string"
        },
        "files": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "mime",
              "bytes",
              "base64"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "mime": {
                "type": "string"
              },
              "bytes": {
                "type": "integer"
              },
              "base64": {
                "type": "string",
                "contentEncoding": "base64"
              }
            }
          }
        }
      }
    }
  }
}

Limits and failures

Limits below are enforced by this endpoint. Additional format, page, duration and model limits in the behavior notes also apply. Browser UI limits can differ from API limits.

request_bytes
8388608
input_characters
1000000
files_bytes
5242880
max_files
0
timeout_seconds
12

Invalid requests return an error object with code and message. Read HTTP statuses, retries, timeouts and concurrency. Execution is synchronous and results are returned in the response.

Complete request schema

Expand the JSON schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "input": {
      "type": "string",
      "maxLength": 1000000,
      "default": "",
      "description": "Plain text input. File tools use files instead unless otherwise documented."
    },
    "options": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "value": {
          "type": "number",
          "description": "Value",
          "default": 1.0
        },
        "from": {
          "type": "string",
          "description": "From",
          "default": "Pa",
          "enum": [
            "Pa",
            "kPa",
            "bar",
            "atm",
            "psi"
          ]
        },
        "to": {
          "type": "string",
          "description": "To",
          "default": "kPa",
          "enum": [
            "Pa",
            "kPa",
            "bar",
            "atm",
            "psi"
          ]
        }
      }
    }
  }
}

For browser automation, use the central WebMCP guidance and discover the tools actually exposed by the browser.

Request example
curl https://happytails.ai/api/v1/tools/pressure/run \
  -H "Content-Type: application/json" \
  --data '{"options": {"value": 1.0, "from": "Pa", "to": "kPa"}}'

Replace the API origin and input values for your application.

200 OK · response structure
{
  "tool": "pressure",
  "result": {
    "text": null,
    "files": []
  }
}

Illustrative envelope. Actual text, filename, MIME type and bytes depend on the result. See the complete output schema.

400 Bad Request
{
  "error": {
    "code": "INVALID_INPUT",
    "message": "Unknown request property. See the tool input schema."
  }
}