< Back to blog
Tutorial Velona Team ·26 July 2026 ·4 min read

Build an Automated Blog & Social Media Repurposing Pipeline with AI

Creating high-quality content takes time. However, publishing a long-form article or video transcript without repurposing it across multiple channels means missing out on significant reach. Manually rewriting a 2,000-word article into an SEO blog post, a 5-tweet Twitter/X thread, and a professional LinkedIn post can easily consume 3 to 4 hours of marketing bandwidth.

In this tutorial, we will build an automated Content Repurposing Engine using Python, FastAPI, and Velona's Unified AI Gateway. By leveraging multi-model routing, we will direct each platform-specific task to the optimal model—saving up to 80% on token costs while generating tailored content for every social channel.

Multi-Model Architecture for Content Pipelines

Instead of relying on a single expensive model for every step, an efficient content pipeline routes sub-tasks dynamically across different LLM providers[cite: 1]:

  1. Long-Form SEO Article Generation: Use high-fluency models like anthropic/claude-3.5-sonnet or openai/gpt-4o for deep tone control and clear structural formatting[cite: 1].
  2. Twitter / X Viral Threads: Use high-speed, concise models like meta/llama-3.1-70b-instruct for punchy hooks and emoji placement[cite: 1].
  3. LinkedIn Professional Posts: Use fast, cost-effective models like google/gemini-flash-1.5 to synthesize key insights into bulleted corporate takeaways[cite: 1].

Step 1: Set Up Your Velona Account & API Key

To access models from Anthropic, Google, Meta, and OpenAI under a single subscription[cite: 1]:

  1. Sign up on the Velona Registration Page[cite: 1].
  2. Navigate to your Prepaid Wallet Dashboard and top up your account balance starting at ₹10 using UPI (GPay, PhonePe) or RuPay[cite: 1]. Velona charges in native Indian Rupees without foreign exchange markups[cite: 1].
  3. Go to API Key Management and create an API key tagged for content-pipeline-prod[cite: 1].
  4. Set an optional monthly spending limit in paise on the key to manage platform budget bounds[cite: 1].

Step 2: Build the FastAPI Repurposing Backend

Create a Python file named content_pipeline.py. We will use Velona's standard REST API endpoint (/gateway/v1/inference/run) to execute concurrent model calls for different channels[cite: 1].

import requests
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI()

VELONA_API_KEY = "YOUR_VELONA_API_KEY"
VELONA_URL = "https://velona.in/gateway/v1/inference/run"

headers = {
    "Authorization": f"Bearer {VELONA_API_KEY}",
    "Content-Type": "application/json"
}

class ContentRequest(BaseModel):
    raw_text: str

@app.post("/repurpose")
async def repurpose_content(req: ContentRequest):
    if len(req.raw_text.strip()) < 100:
        raise HTTPException(status_code=400, detail="Input text must be at least 100 characters.")

    # Task 1: Generate SEO Blog Draft (Claude 3.5 Sonnet)
    blog_prompt = f"Transform the following text into a well-structured SEO blog article with H2 headers and bullet points:\n\n{req.raw_text[:6000]}"
    blog_payload = {
        "model": "anthropic/claude-3.5-sonnet",
        "turns": [{"role": "user", "content": blog_prompt}]
    }
    blog_res = requests.post(VELONA_URL, json=blog_payload, headers=headers).json()
    blog_output = blog_res["choices"][0]["message"]["content"]

    # Task 2: Generate Twitter/X Thread (Llama 3.1 70B)
    tweet_prompt = f"Convert this text into a 5-tweet viral thread with punchy hooks and relevant hashtags:\n\n{req.raw_text[:4000]}"
    tweet_payload = {
        "model": "meta/llama-3.1-70b-instruct",
        "turns": [{"role": "user", "content": tweet_prompt}]
    }
    tweet_res = requests.post(VELONA_URL, json=tweet_payload, headers=headers).json()
    tweet_output = tweet_res["choices"][0]["message"]["content"]

    # Task 3: Generate LinkedIn Post (Gemini Flash 1.5)
    linkedin_prompt = f"Write a professional LinkedIn post summarizing key industry takeaways from this content:\n\n{req.raw_text[:4000]}"
    linkedin_payload = {
        "model": "google/gemini-flash-1.5",
        "turns": [{"role": "user", "content": linkedin_prompt}]
    }
    linkedin_res = requests.post(VELONA_URL, json=linkedin_payload, headers=headers).json()
    linkedin_output = linkedin_res["choices"][0]["message"]["content"]

    return {
        "blog_article": blog_output,
        "twitter_thread": tweet_output,
        "linkedin_post": linkedin_output
    }

Cost Optimization Strategy: Dynamic Model Matching

By routing simpler summarization tasks (like social posts) to fast, ultra-cheap models while reserving high-capability models for long prose, you significantly lower overall pipeline expenses[cite: 1]:

Channel Task Recommended Model Key Advantage
SEO Article Drafts anthropic/claude-3.5-sonnet Superior language fluency, nuance, and structural coherence[cite: 1].
Twitter/X Threads meta/llama-3.1-70b-instruct Fast generation speed and punchy output formatting[cite: 1].
LinkedIn & Summaries google/gemini-flash-1.5 Ultra-low cost per token for rapid bullet-point extraction[cite: 1].

You can review real-time per-token rates in Indian Rupees on the Velona Model Pricing Index[cite: 1] and track token consumption per request on the Usage Analytics Dashboard[cite: 1].

Developer Utilities & Prompt Workbench

When cleaning text inputs, formatting Markdown syntax, or converting character encodings for social media payloads, make use of Velona's 49 Life Time Free Developer Tools[cite: 1, 1]. Utilities like the Markdown Editor, Character Counter, and JSON Formatter run 100% free without deducting wallet funds[cite: 1].

To test prompt variations across multiple models before updating your backend code, experiment in the Free Public Chat Playground[cite: 1] or evaluate social outputs side-by-side using the Model Evaluator[cite: 1]. You can also benchmark reasoning and speed metrics on the AI Benchmark Leaderboard[cite: 1].

Conclusion

Automating your content repurposing workflow allows your team to publish across blogs, X, and LinkedIn in minutes rather than hours. With Velona's unified REST API gateway, Indian creators and developers can build multi-model automation pipelines funded easily via domestic UPI payments[cite: 1].

Ready to automate your social content generation? Sign up for a free Velona account and start building today[cite: 1]!