Generate cryptographically secure random floating-point numbers via GET /v1/generate/random/float. Specify count, min/max bounds, and decimal precision. Returns array like [0.7234, 1.8901] for simulations, testing, or seeding algorithms. Available through MCP in Cursor and Windsurf, plus REST API for reliable randomness without language-specific quirks.
curl "https://tinyfn.io/v1/generate/random/float" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/generate/random/float', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/generate/random/float',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's generator tools:
{
"mcpServers": {
"tinyfn-generator": {
"url": "https://tinyfn.io/mcp/generator",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Use count parameter with min/max bounds: GET /v1/generate/random/float?count=5&min=1.0&max=10.0 returns 5 floats between 1.0 and 10.0.
Yes, use the precision parameter to specify decimal places. precision=2 gives values like 3.14, precision=4 gives 3.1416.
Yes, uses cryptographically secure random number generation, making it suitable for security applications, not just simulations.
AI agents can call the random float generator directly through MCP in tools like Cursor or Claude Code, getting real random values instead of placeholder examples.
This provides cryptographically secure randomness with configurable precision and bounds, while Math.random() uses pseudo-random generation with limited control.
Get your free API key and start using Random Float in seconds.
Get Free API Key