← All tool references

Cooking · execute

Recipe Converter

Convert recipe amounts across cups, tablespoons, teaspoons, milliliters, liters, grams, ounces, and pounds.

Open public tool

Overview

Category
Cooking
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/recipe-converter

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/recipe-converter/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

quantity · number · required
Non-negative source quantity.
from_unit · string · required
Source unit. Accepted values: cup, tbsp, tsp, ml, l, g, oz, lb.
to_unit · string · required
Destination unit. Accepted values: cup, tbsp, tsp, ml, l, g, oz, lb.
ingredient · string · optional
Bundled density assumption. Accepted values: all_purpose_flour, bread_flour, cake_flour, granulated_sugar, brown_sugar_packed, powdered_sugar, butter, white_rice_uncooked, water, whole_milk, honey, cocoa_powder, oats, salt.
{
    "type": "object",
    "properties": {
        "quantity": {
            "type": "number",
            "description": "Non-negative source quantity."
        },
        "from_unit": {
            "type": "string",
            "enum": [
                "cup",
                "tbsp",
                "tsp",
                "ml",
                "l",
                "g",
                "oz",
                "lb"
            ],
            "description": "Source unit."
        },
        "to_unit": {
            "type": "string",
            "enum": [
                "cup",
                "tbsp",
                "tsp",
                "ml",
                "l",
                "g",
                "oz",
                "lb"
            ],
            "description": "Destination unit."
        },
        "ingredient": {
            "type": "string",
            "enum": [
                "all_purpose_flour",
                "bread_flour",
                "cake_flour",
                "granulated_sugar",
                "brown_sugar_packed",
                "powdered_sugar",
                "butter",
                "white_rice_uncooked",
                "water",
                "whole_milk",
                "honey",
                "cocoa_powder",
                "oats",
                "salt"
            ],
            "description": "Bundled density assumption."
        }
    },
    "required": [
        "quantity",
        "from_unit",
        "to_unit"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

result · number
Quantity in target unit.
density_grams_per_cup · number
Browser-calculated density grams per cup.
from_unit · string
Browser-calculated from unit.
to_unit · string
Browser-calculated to unit.
{
    "type": "object",
    "properties": {
        "result": {
            "type": "number",
            "description": "Quantity in target unit."
        },
        "density_grams_per_cup": {
            "type": "number",
            "description": "Browser-calculated density grams per cup."
        },
        "from_unit": {
            "type": "string",
            "description": "Browser-calculated from unit."
        },
        "to_unit": {
            "type": "string",
            "description": "Browser-calculated to unit."
        }
    },
    "additionalProperties": false
}

Convert one US cooking cup to milliliters

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/recipe-converter/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "quantity": 1,
    "from_unit": "cup",
    "to_unit": "ml",
    "ingredient": "water"
}'
{
    "ok": true,
    "data": {
        "slug": "recipe-converter",
        "result": {
            "values": {
                "result": 240,
                "density_grams_per_cup": 236,
                "from_unit": "cup",
                "to_unit": "ml"
            },
            "display": {
                "display": "240"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.