← All tool references

Cooking · not_available

Cocktail Batch Calculator

Scale a cocktail recipe for a group and dilution target.

Open public tool

Overview

Category
Cooking
API mode
not_available
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/cocktail-batch-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/cocktail-batch-calculator/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.

servings · number · required
Enter servings.
ingredients · string · required
Enter per-drink ingredients in ounces.
dilution · number · required
Enter added dilution.
{
    "type": "object",
    "properties": {
        "servings": {
            "type": "number",
            "description": "Enter servings."
        },
        "ingredients": {
            "type": "string",
            "description": "Enter per-drink ingredients in ounces."
        },
        "dilution": {
            "type": "number",
            "description": "Enter added dilution."
        }
    },
    "required": [
        "servings",
        "ingredients",
        "dilution"
    ],
    "additionalProperties": false
}

Output schema

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

batch · array
Batch ingredients produced by the tool.
base_volume_oz · number
Base volume produced by the tool.
water_oz · number
Dilution water produced by the tool.
total_volume_oz · number
Total batch volume produced by the tool.
{
    "type": "object",
    "properties": {
        "batch": {
            "type": "array",
            "description": "Batch ingredients produced by the tool."
        },
        "base_volume_oz": {
            "type": "number",
            "description": "Base volume produced by the tool."
        },
        "water_oz": {
            "type": "number",
            "description": "Dilution water produced by the tool."
        },
        "total_volume_oz": {
            "type": "number",
            "description": "Total batch volume produced by the tool."
        }
    },
    "additionalProperties": false
}

Cocktail Batch Calculator worked example

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/cocktail-batch-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "servings": 12,
    "ingredients": "Spirit|2\nCitrus|0.75\nSyrup|0.5",
    "dilution": 20
}'
{
    "ok": true,
    "data": {
        "slug": "cocktail-batch-calculator",
        "result": {
            "values": {
                "batch": [
                    {
                        "ingredient": "Spirit",
                        "per_drink_oz": 2,
                        "batch_oz": 24
                    },
                    {
                        "ingredient": "Citrus",
                        "per_drink_oz": 0.75,
                        "batch_oz": 9
                    },
                    {
                        "ingredient": "Syrup",
                        "per_drink_oz": 0.5,
                        "batch_oz": 6
                    }
                ],
                "base_volume_oz": 39,
                "water_oz": 7.79999999999999982236431605997495353221893310546875,
                "total_volume_oz": 46.7999999999999971578290569595992565155029296875
            },
            "display": {
                "display": "[{\"ingredient\":\"Spirit\",\"per_drink_oz\":2,\"batch_oz\":24},{\"ingredient\":\"Citrus\",\"per_drink_oz\":0.75,\"batch_oz\":9},{\"ingredient\":\"Syrup\",\"per_drink_oz\":0.5,\"batch_oz\":6}]"
            },
            "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.