Try Chat Free Docs Pricing AI Analysis Repo Insights Free Tools About Blog
Sign in Get started free
< 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. Publishing a long-form article or video transcript without repurposing it across channels means missing out on reach, yet manually rewriting a 2,000-word article into an SEO blog post, a 5-tweet X thread, and a LinkedIn post can easily take 3 to 4 hours.

In this tutorial, we will build an automated Content Repurposing Engine using Python, FastAPI, and Velona's AI Gateway. Each platform-specific task goes to the model that suits it, all three run in parallel, and a full run costs about ₹2 with a premium model on the blog draft, or a few paise with budget models.

Multi-Model Architecture for Content Pipelines

Instead of using one expensive model for every step, an efficient pipeline routes each sub-task to a different model through the same API key:

  1. Long-Form SEO Article: a high-fluency model like anthropic/claude-sonnet-5 for tone control and clear structure.
  2. X Thread: a fast, very cheap model like deepseek/deepseek-v4-flash for short, punchy hooks.
  3. LinkedIn Post: a reliable low-cost model like openai/gpt-4o-mini to turn key insights into a professional summary.

Step 1: Set Up Your Velona Account and API Key

One prepaid wallet gives you models from Anthropic, OpenAI, Google, DeepSeek and more, billed per token in rupees:

  1. Sign up on the Velona Registration Page.
  2. Open your Prepaid Wallet Dashboard and top up starting at ₹10 using UPI (GPay, PhonePe) or RuPay. There is no subscription; you only pay for what you use.
  3. Go to API Key Management and create an API key named content-pipeline-prod.
  4. Set a spending budget on the key to keep the pipeline within your marketing budget.

Step 2: Build the FastAPI Repurposing Backend

Create a file named content_pipeline.py. We call Velona's native endpoint (/gateway/v1/inference/run) three times in parallel with asyncio.gather, so the total time is roughly that of the slowest call.

pip install fastapi uvicorn httpx pydantic
import os
import asyncio
import httpx
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI()

VELONA_API_KEY = os.environ["VELONA_API_KEY"]
VELONA_URL = "https://velona.in/gateway/v1/inference/run"
HEADERS = {
    "Authorization": f"Bearer {VELONA_API_KEY}",
    "Content-Type": "application/json",
}

MODELS = {
    "blog": "anthropic/claude-sonnet-5",
    "thread": "deepseek/deepseek-v4-flash",
    "linkedin": "openai/gpt-4o-mini",
}


class ContentRequest(BaseModel):
    raw_text: str


async def run(client: httpx.AsyncClient, model: str, prompt: str) -> str:
    res = await client.post(
        VELONA_URL,
        headers=HEADERS,
        json={"model": model, "turns": [{"role": "user", "content": prompt}]},
    )
    res.raise_for_status()
    # The native endpoint returns the reply text in data.output
    return res.json()["data"]["output"]


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

    prompts = {
        "blog": "Transform the following text into a well-structured SEO blog "
                f"article with H2 headers and bullet points:\n\n{text[:6000]}",
        "thread": "Convert this text into a 5-tweet thread with a strong hook "
                  f"and at most two hashtags:\n\n{text[:4000]}",
        "linkedin": "Write a professional LinkedIn post with three key takeaways "
                    f"from this content:\n\n{text[:4000]}",
    }

    async with httpx.AsyncClient(timeout=120) as client:
        blog, thread, linkedin = await asyncio.gather(
            run(client, MODELS["blog"], prompts["blog"]),
            run(client, MODELS["thread"], prompts["thread"]),
            run(client, MODELS["linkedin"], prompts["linkedin"]),
        )

    return {"blog_article": blog, "x_thread": thread, "linkedin_post": linkedin}

Want the OpenAI SDK instead? Use AsyncOpenAI(base_url="https://velona.in/v1", api_key=...) with the same model IDs. See how to use an AI API with Python.

What One Run Costs in Rupees

Assume a 6,000 character source (about 1,800 tokens). The blog draft returns about 1,500 tokens; the thread and LinkedIn post about 400 each. Prices are from the Velona pricing page at the time of writing:

SetupBlogX threadLinkedInTotal per run
Claude Sonnet 5 for everything₹1.93₹0.66₹0.66₹3.25
Routed (Sonnet 5 + V4 Flash + GPT-4o Mini)₹1.93₹0.006₹0.04₹1.98
Routed with Claude Haiku 4.5 for the blog₹0.96₹0.006₹0.04₹1.01
Budget (DeepSeek V4 Pro for the blog)₹0.10₹0.006₹0.04₹0.15

Routing saves about 40% against using one premium model for every channel, and the budget setup repurposes about 65 articles for ₹10. Each request's exact rupee cost appears on your usage dashboard. For a reusable routing pattern, see how to build an AI model router in Python.

Developer Utilities and Prompt Testing

When cleaning text inputs, formatting Markdown, or checking post lengths, use Velona's free developer tools such as the Markdown Editor, Character Counter, and JSON Formatter. They run in your browser and never touch your wallet.

To compare how each model writes the same LinkedIn post before you pick one, use the Model Evaluator.

Conclusion

Automating content repurposing lets your team publish across a blog, X, and LinkedIn in minutes rather than hours. With Velona, Indian creators and developers can mix models from different providers in one pipeline and pay for all of it with a UPI top-up.

Ready to automate your content? Create a free Velona account, add ₹10, and run your first repurposing job today.