Need to generate usernames for your application? This guide covers everything you need to know about username generation via API, including styles, formats, and implementation examples.
Username Styles
The API generates usernames in various styles to match different platforms and preferences. From professional-looking handles to fun gaming names, you can create the perfect username for any context.
All generated usernames are designed to be unique, memorable, and appropriate for general use.
Format Options
Available username styles and formats:
Word Combination
Combines adjectives, nouns, and sometimes numbers for memorable names like "SwiftFalcon42" or "BrightMountain".
Alliterative
Words starting with the same letter for catchy names like "CoolCactus" or "MightyMouse".
Fantasy Style
Epic-sounding names suitable for games: "Shadowblade", "Stormweaver", "Ironheart".
Professional
Clean, professional-looking usernames for business contexts.
Random Letters + Numbers
Simple alphanumeric combinations for maximum uniqueness.
Using the Username Generator API
TinyFn provides a simple endpoint to generate usernames:
GET https://api.tinyfn.io/v1/generate/username?style=gaming&count=5
Headers: X-API-Key: your-api-key
{
"usernames": [
"ShadowPhoenix99",
"IronWolf_X",
"CyberNinja2024",
"StormRider77",
"BlazeFury_Pro"
],
"style": "gaming",
"count": 5
}
Parameters
| Parameter | Type | Description |
|---|---|---|
style |
string | Style: gaming, professional, fantasy, cute, random |
max_length |
integer | Maximum username length |
include_numbers |
boolean | Include numbers in username (default: true) |
separator |
string | Separator character: none, underscore, hyphen |
count |
integer | Number of usernames to generate (default: 1) |
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://api.tinyfn.io/v1/generate/username?style=gaming&count=5',
{ headers: { 'X-API-Key': 'your-api-key' } }
);
const { usernames } = await response.json();
console.log(`Suggestions: ${usernames.join(', ')}`);
// Suggestions: ShadowPhoenix99, IronWolf_X, ...
Python
import requests
response = requests.get(
'https://api.tinyfn.io/v1/generate/username',
params={'style': 'gaming', 'count': 5},
headers={'X-API-Key': 'your-api-key'}
)
usernames = response.json()['usernames']
for username in usernames:
print(username)
cURL
curl "https://api.tinyfn.io/v1/generate/username?style=gaming&count=5" \
-H "X-API-Key: your-api-key"
Common Use Cases
- User Registration: Suggest usernames during signup
- Gaming Platforms: Generate gamertags and character names
- Social Apps: Default usernames for new accounts
- Demo Accounts: Generate test user identities
- Anonymous Features: Create random identities for anonymous posting
Best Practices
- Offer choices: Generate multiple options for users to pick from
- Check availability: Verify username isn't taken before suggesting
- Match platform style: Use appropriate formats for your context
- Respect length limits: Use max_length to fit platform requirements
Use via MCP
Your AI agent can call this tool directly via Model Context Protocol — no HTTP code needed. Add TinyFn to Claude Desktop, Cursor, or any MCP client:
{
"mcpServers": {
"tinyfn-generate": {
"url": "https://api.tinyfn.io/mcp/generate/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
See all generator tools available via MCP in our Generator MCP Tools for AI Agents guide.
Try the Username Generator API
Get your free API key and start generating usernames in seconds.
Get Free API Key