Overview
- Category
- Generators
- 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/random-decimal-generator
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/random-decimal-generator/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.
min· number · required- Enter the inclusive lower bound for generated values.
max· number · required- Enter the inclusive upper bound for generated values.
precision· number · required- Enter the number of decimal places to keep in each generated value.
count· number · required- Enter how many swatches, rolls, picks, names, letters, or values you want returned.
{
"type": "object",
"properties": {
"min": {
"type": "number",
"description": "Enter the inclusive lower bound for generated values."
},
"max": {
"type": "number",
"description": "Enter the inclusive upper bound for generated values."
},
"precision": {
"type": "number",
"description": "Enter the number of decimal places to keep in each generated value."
},
"count": {
"type": "number",
"description": "Enter how many swatches, rolls, picks, names, letters, or values you want returned."
}
},
"required": [
"min",
"max",
"precision",
"count"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
numbers· array- Browser-calculated numbers.
result· string- Browser-calculated result.
min· number- Browser-calculated min.
max· number- Browser-calculated max.
decimals· number- Browser-calculated decimals.
{
"type": "object",
"properties": {
"numbers": {
"type": "array",
"items": [],
"description": "Browser-calculated numbers."
},
"result": {
"type": "string",
"description": "Browser-calculated result."
},
"min": {
"type": "number",
"description": "Browser-calculated min."
},
"max": {
"type": "number",
"description": "Browser-calculated max."
},
"decimals": {
"type": "number",
"description": "Browser-calculated decimals."
}
},
"additionalProperties": false
}
Random Decimal Generator: Unit interval
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/random-decimal-generator/execute" \
-H "Content-Type: application/json" \
-d '{
"min": 0,
"max": 1,
"precision": 4,
"count": 3
}'
{
"ok": true,
"data": {
"slug": "random-decimal-generator",
"result": {
"values": {
"numbers": [
0.1283999999999999863664612576030776835978031158447265625,
0.5521000000000000351718654201249592006206512451171875,
0.9032999999999999918287585387588478624820709228515625
],
"result": "0.1284, 0.5521, 0.9033",
"min": 0,
"max": 1,
"decimals": 4
},
"display": {
"display": "[0.1283999999999999863664612576030776835978031158447265625,0.5521000000000000351718654201249592006206512451171875,0.9032999999999999918287585387588478624820709228515625]"
},
"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.