Skip to main content

AI Captions

UniPulse's AI engine is powered by Google Gemini 2.5 Flash and provides a full suite of content generation tools — from captions and hashtags to CTAs, translations, and even image generation. Every AI feature consumes credits from your workspace's ai_credits quota.


AI Endpoints Overview

UniPulse exposes six AI endpoints, all accessible from within the Composer or via the API:

EndpointMethodPurpose
/ai/caption/generatePOSTGenerate new captions from a topic or brief
/ai/caption/rewritePOSTRewrite an existing caption with different parameters
/ai/hashtags/generatePOSTGenerate relevant hashtags for your content
/ai/cta/generatePOSTGenerate call-to-action suggestions
/ai/translatePOSTTranslate a caption to another language
/ai/image/generatePOSTGenerate an AI image from a text prompt
AI Credits

Every AI call deducts from your workspace's ai_credits quota. You can check your remaining credits in Settings > Workspace > Usage. Different endpoints may consume different amounts of credits.


Caption Generation

The primary AI feature. When you click AI Generate in the Composer, you're calling POST /ai/caption/generate with a CaptionInput payload.

CaptionInput Parameters

ParameterTypeDescription
topicstringThe subject or brief for the caption
tonestringDesired tone — professional, casual, playful, urgent, witty, etc.
lengthstringTarget length — short (1–2 lines), medium, or long-form
languagestringOutput language (English, Arabic, and more)
hashtagsboolean/optionsWhether to include hashtags, and count preferences
emojistringEmoji usage level — none, minimal, or heavy
CTA optionsobjectWhether to include a call-to-action and its style

Step-by-Step

  1. Open the Composer
  2. Click AI Generate (or use Ctrl/Cmd + Shift + G)
  3. Enter a topic or brief — or let the AI analyze your uploaded media for context
  4. Configure tone, length, language, hashtags, emoji, and CTA preferences
  5. Click Generate to receive multiple caption options
  6. Select your favorite, or mix elements from different suggestions
tip

Be specific in your brief. "Announce our summer sale with 30% off all products, targeting young professionals" will produce dramatically better results than "write something about a sale."


Caption Rewriting

Already have a caption but want to improve it? Use POST /ai/caption/rewrite to:

  • Change the tone (e.g., make a formal caption more casual)
  • Shorten or lengthen the text
  • Add or remove hashtags and emojis
  • Adapt it for a different platform
  • Inject a CTA into existing copy

The rewrite endpoint accepts the same CaptionInput parameters plus your existing caption as the base text.


Hashtag Generation

The POST /ai/hashtags/generate endpoint analyzes your caption content, uploaded media, and niche to suggest relevant hashtags. Generated hashtags are stored in the Post's hashtags[] array, with per-platform overrides available via hashtagOverrides (JSON).

What the AI considers:

  • Your caption topic and keywords
  • Trending hashtags in your niche
  • Your Brand Voice hashtag preferences (branded hashtags, count preferences)
  • Platform-specific best practices (e.g., up to 30 for Instagram, fewer for Facebook)

CTA Generation

The POST /ai/cta/generate endpoint produces call-to-action suggestions tailored to your content. Examples:

  • "Shop the collection — link in bio"
  • "Double-tap if you agree"
  • "Save this for later"
  • "Tag a friend who needs this"

The AI adapts CTA style based on your tone settings and target platform.


Translation

The POST /ai/translate endpoint translates your finalized caption into another language while preserving:

  • Brand voice and tone
  • Hashtag relevance (translates or finds equivalent trending tags)
  • Emoji placement
  • CTA intent

This is particularly useful for workspaces managing bilingual audiences (e.g., English and Arabic).


AI Image Generation

The POST /ai/image/generate endpoint creates images from text prompts. Generated images are saved as MediaFile objects and can be attached to your post directly from the Composer.

warning

AI-generated images consume more credits than text generation. Check your ai_credits balance before generating multiple images.


Brand Voice Integration

If you have a Brand Voice configured for your workspace, all AI endpoints automatically use it. The Brand Voice supplies:

  • toneAttributes — How formal, playful, or authoritative the output should sound
  • vocabulary — Industry terms, brand-specific phrases, and words to avoid
  • writingStyle — Sentence structure preferences, paragraph length, formatting habits
  • samplePosts — Real examples the AI uses as reference for style matching

You'll see a Brand Voice: Active indicator in the Composer when a default Brand Voice is applied.


Tips for Better Results

  1. Upload media first — The AI can analyze images and videos for visual context, producing more relevant captions
  2. Generate multiple options — Click regenerate to get fresh variations; mix and match elements from different suggestions
  3. Use the rewrite endpoint — Instead of starting over, refine what you have
  4. Be specific with topics — Include details like target audience, key message, and desired action
  5. Leverage Brand Voice — A well-trained Brand Voice dramatically improves consistency across all generated content

Behind the Scenes

When you trigger any AI generation, the request is placed on the ai-suggestions queue for processing. The AI engine:

  1. Receives your CaptionInput parameters
  2. Loads your workspace's active Brand Voice (if configured)
  3. Calls Gemini 2.5 Flash with a structured prompt
  4. Returns multiple options ranked by relevance
  5. Deducts credits from your ai_credits quota

The post-classify queue may also run post-generation to categorize and tag the content for analytics purposes.