Overview
- Category
- Developer Tools
- 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/css-minifier
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/css-minifier/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.
css· string · required- Paste CSS to minify.
remove_final_semicolon· boolean · optional- Turn remove final declaration semicolons on or off.
{
"type": "object",
"properties": {
"css": {
"type": "string",
"description": "Paste CSS to minify."
},
"remove_final_semicolon": {
"type": "boolean",
"description": "Turn remove final declaration semicolons on or off."
}
},
"required": [
"css"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
minified_css· string- Minified CSS produced by the calculation.
original_bytes· number- Original size in bytes produced by the calculation.
minified_bytes· number- Minified size in bytes produced by the calculation.
savings_percent· number- Size reduction produced by the calculation.
{
"type": "object",
"properties": {
"minified_css": {
"type": "string",
"description": "Minified CSS produced by the calculation."
},
"original_bytes": {
"type": "number",
"description": "Original size in bytes produced by the calculation."
},
"minified_bytes": {
"type": "number",
"description": "Minified size in bytes produced by the calculation."
},
"savings_percent": {
"type": "number",
"description": "Size reduction produced by the calculation."
}
},
"additionalProperties": false
}
CSS Minifier 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/css-minifier/execute" \
-H "Content-Type: application/json" \
-d '{
"css": ".card {\n color: #123456;\n padding: 1rem 1.5rem;\n}",
"remove_final_semicolon": true
}'
{
"ok": true,
"data": {
"slug": "css-minifier",
"result": {
"values": {
"minified_css": ".card{color:#123456;padding:1rem 1.5rem}",
"original_bytes": 51,
"minified_bytes": 40,
"savings_percent": 21.57000000000000028421709430404007434844970703125
},
"display": {
"display": ".card{color:#123456;padding:1rem 1.5rem}"
},
"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.