aibabynames
v1.0.0
Published
A simple Express middleware for generating baby names based on parents' names using OpenAI's GPT model. Provided by SeeYourBabyAI.
Downloads
8
Maintainers
Readme
AI Baby Name Generator
A simple Express middleware for generating baby names based on parents' names using OpenAI's GPT model. Provided by SeeYourBabyAI.
Installation
npm install ai-baby-name-generator
Usage
const express = require('express');
const createAIBabyNameGenerator = require('ai-baby-name-generator');
const app = express();
const OPENAI_API_KEY = 'your-api-key-here';
app.use('/babyname', createAIBabyNameGenerator(OPENAI_API_KEY));
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
Send a POST request to /babyname
with the following body:
{
"partner1": "John",
"partner2": "Jane",
"gender": "male",
"token": "unique-user-token"
}
The response will contain an array of suggested baby names.
Note
This package requires a valid OpenAI API key. Make sure to keep your API key secure and do not expose it in your code.