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

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

टोक़ परिवर्तित करें

न्यूटन मीटर और पाउंड-फीट के बीच कनवर्ट करें।

इंटरफ़ेस

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

निवेदन

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

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

प्रतिक्रिया

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

JSON
{
  "ok": true,
  "data": {
    "input": {
      "value": 400,
      "from": "nm",
      "to": "lbft"
    },
    "conversions": {
      "nm": 400,
      "lbft": 295.0248597109062
    },
    "result": 295.0248597109062
  }
}

स्कीमा

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

इनपुट स्कीमा

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "value": {
      "type": "number",
      "description": "Torque value to convert. Must be finite and non-negative."
    },
    "from": {
      "type": "string",
      "enum": [
        "nm",
        "lbft"
      ],
      "description": "Input torque unit."
    },
    "to": {
      "type": "string",
      "enum": [
        "nm",
        "lbft"
      ],
      "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": [
            "nm",
            "lbft"
          ]
        },
        "to": {
          "type": "string",
          "enum": [
            "nm",
            "lbft"
          ]
        }
      },
      "required": [
        "value",
        "from"
      ]
    },
    "conversions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "nm": {
          "type": "number"
        },
        "lbft": {
          "type": "number"
        }
      },
      "required": [
        "nm",
        "lbft"
      ]
    },
    "result": {
      "type": "number",
      "description": "Target-unit result when a target unit is supplied."
    }
  },
  "required": [
    "input",
    "conversions"
  ]
}
API और MCP दस्तावेज़