Overview
- Category
- Security
- API mode
execute- Processing
- client-side
- Privacy
- sensitive-local
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-token-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-token-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.
bytes· number · required- Choose how many random bytes of entropy the token should contain; 32 bytes is suitable for many secrets.
encoding· string · required-
Text encoding for the generated bytes. Accepted values:
hex, base64, base64url.
{
"type": "object",
"properties": {
"bytes": {
"type": "number",
"description": "Choose how many random bytes of entropy the token should contain; 32 bytes is suitable for many secrets."
},
"encoding": {
"type": "string",
"enum": [
"hex",
"base64",
"base64url"
],
"description": "Text encoding for the generated bytes."
}
},
"required": [
"bytes",
"encoding"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
token· string- Generated token; sensitive output.
bytes· number- Number of random bytes.
format· string- Applied text encoding.
entropy_bits· number- Nominal random-bit count, bytes × 8.
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Generated token; sensitive output."
},
"bytes": {
"type": "number",
"description": "Number of random bytes."
},
"format": {
"type": "string",
"description": "Applied text encoding."
},
"entropy_bits": {
"type": "number",
"description": "Nominal random-bit count, bytes × 8."
}
},
"additionalProperties": false
}
Generate a 32-byte URL-safe token
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-token-generator/execute" \
-H "Content-Type: application/json" \
-d '{
"bytes": 32,
"encoding": "base64url"
}'
{
"ok": true,
"data": {
"slug": "random-token-generator",
"result": {
"values": {
"token": "4vNQ-Km1oE7zL2xYpR8uC5aW0sT9dH3bJ6fGqI2nMkc",
"bytes": 32,
"format": "base64url",
"entropy_bits": 256
},
"display": {
"display": "4vNQ-Km1oE7zL2xYpR8uC5aW0sT9dH3bJ6fGqI2nMkc"
},
"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.