A simple but powerful text generator that uses the Anthropic Claude API to create poems, short stories, jokes, and articles on any topic.
- 4 content types — Poem, Short Story, Joke, Article
- 4 languages — English, Turkish, Spanish, French
- History — Generated texts are saved in the session
- Copy to clipboard — One-click copy for each result
- Show more / less — Expandable history items
- Clean dark UI — Minimal and responsive design
- Vanilla JavaScript
- HTML + CSS
- Anthropic Claude API (
claude-sonnet-4-5)
- Clone the repo:
git clone https://github.com/mastartm/text-generator.git
cd text-generator-
Get your API key from console.anthropic.com
-
Open
index.htmland replaceYOUR_API_KEY_HEREwith your key:
"x-api-key": "YOUR_API_KEY_HERE"- Run with a local server:
live-serverNever commit your real API key to GitHub. Keep it local only.
Built with Claude API + Vanilla JS