HI
API & MCPदस्तावेज़ीकरण

Road User Tools एजेंट और API प्लेटफ़ॉर्म

टायर दबाव परिवर्तित करें

पाउंड प्रति वर्ग इंच, बार और किलोपास्कल के बीच कनवर्ट करें।

इंटरफ़ेस

POST
REST समापन बिंदु/api/v1/pressure/convert
MCP
उपकरण का नामconvert_pressure

निवेदन

अनुरोध को JSON के रूप में भेजें। MCP क्लाइंट टूल तर्कों के समान फ़ील्ड पास करते हैं।

cURLshell
curl -X POST https://roaduser.tools/api/v1/pressure/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "value": 32,
  "from": "psi",
  "to": "bar"
}'
निकाय से अनुरोध करेंjson
{
  "value": 32,
  "from": "psi",
  "to": "bar"
}

प्रतिक्रिया

REST गणना परिणाम को मानक सफलता लिफाफे में लपेटता है। MCP संरचित टूल आउटपुट के समान गणना डेटा लौटाता है।

JSON
{
  "ok": true,
  "data": {
    "input": {
      "value": 32,
      "from": "psi",
      "to": "bar"
    },
    "conversions": {
      "psi": 32,
      "bar": 2.2063223338137603,
      "kpa": 220.632233381376
    },
    "result": 2.2063223338137603
  }
}

स्कीमा

नीचे दी गई परिभाषाएँ इनपुट को मान्य करने और आउटपुट का वर्णन करने के लिए उपयोग की जाने वाली संपूर्ण JSON स्कीमा दिखाती हैं।

इनपुट स्कीमा

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "value": {
      "type": "number",
      "description": "Pressure value to convert. Must be finite and non-negative."
    },
    "from": {
      "type": "string",
      "enum": [
        "psi",
        "bar",
        "kpa"
      ],
      "description": "Input pressure unit."
    },
    "to": {
      "type": "string",
      "enum": [
        "psi",
        "bar",
        "kpa"
      ],
      "description": "Optional target unit. When omitted, all units are returned."
    }
  },
  "required": [
    "value",
    "from"
  ]
}

आउटपुट स्कीमा

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "input": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "value": {
          "type": "number"
        },
        "from": {
          "type": "string",
          "enum": [
            "psi",
            "bar",
            "kpa"
          ]
        },
        "to": {
          "type": "string",
          "enum": [
            "psi",
            "bar",
            "kpa"
          ]
        }
      },
      "required": [
        "value",
        "from"
      ]
    },
    "conversions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "psi": {
          "type": "number"
        },
        "bar": {
          "type": "number"
        },
        "kpa": {
          "type": "number"
        }
      },
      "required": [
        "psi",
        "bar",
        "kpa"
      ]
    },
    "result": {
      "type": "number",
      "description": "Target-unit result when a target unit is supplied."
    }
  },
  "required": [
    "input",
    "conversions"
  ]
}
API और MCP दस्तावेज़