질량 단위 변환기
미터법 단위, 파운드 및 온스 사이에서 질량을 변환하세요.
기본 URL: https://happytails.ai · 공개 API가 연결되지 않았습니다
처리
파운드와 온스는 트로이 단위가 아닌 상용 질량 단위를 사용합니다. 결과는 유효숫자 12자리로 반올림됩니다. 입력 데이터는 기기에만 남습니다.
API로 전송한 입력 데이터는 서버에서 처리됩니다.
요청 매개변수
JSON 객체를 전송하세요. 알 수 없는 속성은 거부됩니다. 생략한 옵션에는 아래의 기본값이 적용됩니다. 숫자와 불리언은 따옴표 없이 JSON 값으로 입력하세요.
텍스트 입력은 필요하지 않습니다. 아래 설정을 사용하세요.
이 엔드포인트는 files 배열을 받지 않습니다.
옵션
options.valuenumber값
options.fromstring변환 전
options.tostring변환 후
성공 응답
HTTP 200 응답에는 tool과 result가 포함됩니다. 텍스트는 result.text에 있으며 파싱된 JSON이 result.data에도 포함될 수 있습니다. 생성된 파일은 result.files에 있고 각 파일에는 name, mime, bytes, base64가 있습니다. 저장하기 전에 바이트를 디코딩하세요. 다른 유형의 결과를 반환하는 작업에서는 파일 배열이 비어 있거나 텍스트가 null이어도 유효합니다.
전체 출력 스키마
{
"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"
}
}
}
}
}
}
}
}제한 및 오류
이 엔드포인트에는 아래 제한이 적용됩니다. 동작 설명에 명시된 형식, 페이지 수, 길이 및 모델 제한도 적용됩니다. 브라우저 화면의 제한은 API 제한과 다를 수 있습니다.
request_bytes- 8388608
input_characters- 1000000
files_bytes- 5242880
max_files- 0
timeout_seconds- 12
잘못된 요청에는 code 및 message 필드가 포함된 error 객체가 반환됩니다. HTTP 상태 코드, 재시도, 시간 제한 및 동시 요청을 참고하세요. 동기 방식으로 처리되며 결과는 같은 응답으로 반환됩니다.
전체 요청 스키마
JSON 스키마 펼치기
{
"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": "kg",
"enum": [
"kg",
"g",
"mg",
"lb",
"oz",
"tonne"
]
},
"to": {
"type": "string",
"description": "To",
"default": "g",
"enum": [
"kg",
"g",
"mg",
"lb",
"oz",
"tonne"
]
}
}
}
}
}브라우저를 자동화할 때는 공통 리소스 WebMCP 안내에서 브라우저가 실제로 제공하는 도구를 확인하세요.
curl https://happytails.ai/api/v1/tools/weight/run \
-H "Content-Type: application/json" \
--data '{"options": {"value": 1.0, "from": "kg", "to": "g"}}'const payload = {
"options": {
"value": 1.0,
"from": "kg",
"to": "g"
}
};
const response = await fetch(
"https://happytails.ai/api/v1/tools/weight/run",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}
);
const data = await response.json();
if (!response.ok) throw new Error(data.error.message);
console.log(data.result);import json
from urllib.request import Request, urlopen
payload = json.loads('{"options": {"value": 1.0, "from": "kg", "to": "g"}}')
request = Request(
"https://happytails.ai/api/v1/tools/weight/run",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
with urlopen(request, timeout=200) as response:
result = json.load(response)
print(result){
"options": {
"value": 1.0,
"from": "kg",
"to": "g"
}
}API 출처(origin)와 입력값을 앱에 맞게 변경하세요.
{
"tool": "weight",
"result": {
"text": null,
"files": []
}
}응답 구조의 예입니다. 실제 텍스트, 파일 이름, MIME 유형, 바이트 수는 결과에 따라 달라집니다. 전체 출력 스키마를 참조하세요.
{
"error": {
"code": "INVALID_INPUT",
"message": "Unknown request property. See the tool input schema."
}
}