POST
math
random_number
1 creditGenerate a random integer or float within a range
Endpoint
POST /api/v1/tools/math/random_number
Body Parameters
max
number
optional
default: 1
min
number
optional
default: 0
integer
boolean
optional
default: false
Example
input
Request
{
"max": 100,
"min": 1,
"integer": true
}
output
Response
{
"max": 100,
"min": 1,
"number": 42,
"integer": true
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"max": 100,
"min": 1,
"number": 42,
"integer": true
},
"meta": {
"tool": "random_number",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.