franchise-name-generator
v1.0.0
Published
Generate creative character names inspired by popular franchises using OpenAI's GPT model
Downloads
72
Maintainers
Readme
Franchise Name Generator
A powerful Express middleware for generating creative character names inspired by popular franchises using OpenAI's GPT model. Provided by Stargazer.
Installation
npm install franchise-name-generator
Features
- Generate fantasy names inspired by popular franchises
- Supported franchises: Marvel, DC, Star Wars, Lord of the Rings, Game of Thrones
- Random option for general fantasy names
- Rate limiting included
- CORS enabled
Usage
const express = require('express');
const createFranchiseNameGenerator = require('franchise-name-generator');
const app = express();
const OPENAI_API_KEY = 'your-api-key-here';
app.use('/names', createFranchiseNameGenerator(OPENAI_API_KEY));
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
Send a POST request to /names
with the following body:
{
"franchise": "marvel", // or "dc", "starwars", "lotr", "got", "random"
"token": "unique-user-token"
}
The response will contain an array of generated character names.
Response Example
{
"characterNames": {
"character_names": [
"Quantum Striker",
"Nova Phoenix",
"Iron Thunder",
"Cosmic Wraith",
"Shadow Pulse"
]
}
}
Rate Limiting
The middleware includes basic rate limiting:
- Maximum 10 requests per token
- Requests are tracked per user token
Note
This package requires a valid OpenAI API key. Make sure to keep your API key secure and never expose it in your code.
Keywords
fantasy, names, generator, franchise, marvel, dc, starwars, got, lotr, openai, gpt