• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
Ermd33s

Ermd33s

ContentGen

Public
Like
ContentGen
Home
Code
2
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/2/2025
Viewing readonly version of main branch: v5
View latest version
README.md

Jeropay Caption Idea Generator

An HTTP Val that generates creative social media captions for the Jeropay team using OpenAI's GPT-4o-mini model.

Features

  • Generates 5 catchy, audience-friendly captions based on any topic
  • Tailored for young professionals and creatives
  • Helpful, positive tone aligned with Jeropay's brand
  • Uses Val Town's free OpenAI integration

Usage

API Endpoint

POST /

Request Body

{ "topic": "your topic here" }

Response

{ "topic": "your topic here", "captions": "Generated captions content..." }

Example Request

curl -X POST https://your-val-url.web.val.run \ -H "Content-Type: application/json" \ -d '{"topic": "summer productivity tips"}'

Example Response

{ "topic": "summer productivity tips", "captions": "1. 🌞 **Summer Vibes, Productive Minds!** ☀️ Embrace the warmth and transform your sunny days into a productivity powerhouse! Check out our top tips to keep you focused and thriving all summer long! #SummerSuccess\n\n2. 🚀 **Beat the Summer Slump!** From morning coffee on the patio to afternoon brainstorming at the beach, discover how to maximize your productivity while soaking up the sun! ☕🏖️ #WorkHardPlayHard\n\n..." }

Error Handling

  • 400 Bad Request: Missing topic parameter
  • 405 Method Not Allowed: Non-POST requests
  • 500 Internal Server Error: OpenAI API errors

Technical Details

  • Uses Val Town's std/openai for free OpenAI access
  • Model: gpt-4o-mini
  • Temperature: 0.8 (for creative variation)
  • Max tokens: 500

Content Guidelines

The generated captions are optimized for:

  • Young professionals and creatives
  • Engaging hooks and action-oriented copy
  • Positive, helpful tone
  • Avoiding generic phrases
  • Social media best practices
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.