Docs/Format Utils/GET /v1/si-convert

GET /v1/si-convertSI / unit prefix converter

Format Utils lf-format-utils

Converts between unit prefixes such as kilo and milli. SI / unit prefix converter

Query Parameters

ParameterTypeRequiredDescription
valuestringYesNumeric value with unit (e.g. 5MB)
fromstringNoSource unit prefix
tostringNoTarget unit prefix

Response Schema

input (string): Original value
output (string): Converted value
factor (number): Conversion factor

cURL Example

curl 'https://lf-format-utils.laminarforge.dev/v1/si-convert?value=<value>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/si-convert'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'value': '<value>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())