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-number-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-number-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- Inclusive lower bound.
max· number · required- Inclusive upper bound.
count· number · required- Number of values, from 1 to 100.
distribution· string · required-
Sampling distribution. Accepted values:
uniform. unique· boolean · required- Whether values may repeat.
number_type· string · optional-
Integer or fixed-precision decimal output. Accepted values:
integer, decimal. precision· number · optional- Decimal places from 0 to 8.
{
"type": "object",
"properties": {
"min": {
"type": "number",
"description": "Inclusive lower bound."
},
"max": {
"type": "number",
"description": "Inclusive upper bound."
},
"count": {
"type": "number",
"description": "Number of values, from 1 to 100."
},
"distribution": {
"type": "string",
"enum": [
"uniform"
],
"description": "Sampling distribution."
},
"unique": {
"type": "boolean",
"description": "Whether values may repeat."
},
"number_type": {
"type": "string",
"enum": [
"integer",
"decimal"
],
"description": "Integer or fixed-precision decimal output."
},
"precision": {
"type": "number",
"description": "Decimal places from 0 to 8."
}
},
"required": [
"min",
"max",
"count",
"distribution",
"unique"
],
"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.
type· string- Browser-calculated type.
{
"type": "object",
"properties": {
"numbers": {
"type": "array",
"items": {
"type": "number"
},
"description": "Browser-calculated numbers."
},
"result": {
"type": "string",
"description": "Browser-calculated result."
},
"type": {
"type": "string",
"description": "Browser-calculated type."
}
},
"additionalProperties": false
}
Twelve unique integers
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-number-generator/execute" \
-H "Content-Type: application/json" \
-d '{
"min": 1,
"max": 20,
"count": 12,
"distribution": "uniform",
"unique": true,
"number_type": "integer",
"precision": 2
}'
{
"ok": true,
"data": {
"slug": "random-number-generator",
"result": {
"values": {
"numbers": [
3,
17,
8,
20,
1,
12,
6,
15,
10,
4,
19,
13
],
"result": "3, 17, 8, 20, 1, 12, 6, 15, 10, 4, 19, 13",
"type": "integer"
},
"display": {
"display": "[3,17,8,20,1,12,6,15,10,4,19,13]"
},
"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.