Skip to main content
POST
Convert Unit

Request contract

  • Method and path: POST /apis/v1/api-ninjas/convert-unit
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/api-ninjas/convert-unit
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.00089 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amount
number
required

The numerical value to convert. Must be a positive or negative number.

Examples:

10

100

25.5

-5

unit
string
required

The source unit to convert from (e.g., 'meter', 'kilogram', 'celsius', 'gallon'). If the unit name has spaces, replace them with underscores (e.g., 'square_meter').

Examples:

"meter"

"kilogram"

"celsius"

"gallon"

"square_meter"

Response

Tool result data

amount
number
required
conversions
object
required
type
string
required
unit
string
required