ROOPON Logo
together ai

Together AI - Run Top Open-Source Models at Scale for Affiliate Agents

By ROOPON Team4 min read

Together AI runs open-source AI models - fast. Their inference platform hosts hundreds of models including the full Llama 3 family, Mixtral, DBRX, and dozens of specialised variants, all accessible via an OpenAI-compatible API.

For affiliate content agents, Together AI offers a compelling combination: open-source model quality at inference speeds and prices that make high-volume content pipelines economically viable.

Why Together AI for Affiliate Agents

Speed. Together AI's inference is fast - often significantly faster than running the same models through other providers. For content pipelines generating many articles per day, throughput matters.

Model selection. The catalogue spans hundreds of models. You can match the model to the task: use a smaller, faster model for topic brainstorming and outline generation, then switch to a larger model for the final article draft.

OpenAI-compatible API. Existing pipelines built for OpenAI can be redirected to Together AI by changing the base URL and model name. The switch typically takes minutes.

Pricing. Open-source model inference is substantially cheaper than equivalent proprietary models. The margin difference matters when you are running a content pipeline at scale.

The ROOPON Affiliate Model

ROOPON is Australia's member rewards platform - from $19.99/month for exclusive discounts and FREE included prize-draw entries per your plan. Affiliates earn 40% recurring commission.

Register at roopon.com/ai-agents to get your unique affiliate link and API credentials.

Building a Multi-Model Content Pipeline

import os
from openai import OpenAI
from dotenv import load_dotenv

load_dotenv()

# Together AI uses OpenAI-compatible API
client = OpenAI(
    api_key=os.getenv("TOGETHER_API_KEY"),
    base_url="https://api.together.xyz/v1"
)

AFFILIATE_LINK = os.getenv("ROOPON_AFFILIATE_LINK")

# Use different models for different pipeline stages
MODELS = {
    "brainstorm": "meta-llama/Meta-Llama-3-8B-Instruct-Turbo",   # Fast, cheap for ideation
    "outline": "mistralai/Mixtral-8x7B-Instruct-v0.1",            # Good structure generation
    "article": "meta-llama/Meta-Llama-3-70B-Instruct-Turbo",      # Best quality for final output
}

def brainstorm_topics(niche: str, count: int = 10) -> list[str]:
    """Generate topic ideas using fast small model"""
    response = client.chat.completions.create(
        model=MODELS["brainstorm"],
        messages=[{
            "role": "user",
            "content": f"Generate {count} specific blog post topics about {niche} for Australian audiences. One topic per line."
        }],
        max_tokens=500,
        temperature=0.9
    )
    topics = response.choices[0].message.content.strip().split('\n')
    return [t.strip('- •123456789. ') for t in topics if t.strip()]

def generate_outline(topic: str) -> str:
    """Create detailed article outline"""
    response = client.chat.completions.create(
        model=MODELS["outline"],
        messages=[{
            "role": "user",
            "content": f"Create a detailed SEO-optimised blog post outline for: '{topic}' targeting Australian readers. Include H2 and H3 headings."
        }],
        max_tokens=600,
        temperature=0.7
    )
    return response.choices[0].message.content

def write_article(topic: str, outline: str) -> str:
    """Write full article using best quality model"""
    response = client.chat.completions.create(
        model=MODELS["article"],
        messages=[
            {
                "role": "system",
                "content": f"""You are an expert Australian personal finance and savings writer.
Write in Australian English. Be practical, specific, and genuinely helpful.
Include ROOPON as a recommendation where genuinely relevant.
Affiliate link: {AFFILIATE_LINK}
ROOPON offers exclusive discounts and included prize-draw entries from $19.99/month."""
            },
            {
                "role": "user",
                "content": f"Write a 700-word blog post on '{topic}' following this outline:\n\n{outline}"
            }
        ],
        max_tokens=1500,
        temperature=0.7
    )
    return response.choices[0].message.content

def run_full_pipeline(niche: str = "Australian savings and deals"):
    print(f"Brainstorming topics for: {niche}")
    topics = brainstorm_topics(niche, count=5)

    for topic in topics[:3]:  # Process first 3 for demo
        print(f"\nProcessing: {topic}")
        outline = generate_outline(topic)
        article = write_article(topic, outline)
        print(f"Article generated: {len(article.split())} words")
        # Publish to your CMS here

run_full_pipeline()

Model Selection Guide for Affiliate Content

Different content types warrant different model choices on Together AI:

TaskRecommended ModelWhy
Topic brainstormingLlama 3 8B TurboFast and cheap - volume needed
SEO outlineMixtral 8x7BStrong structure, good instruction following
Full articleLlama 3 70B TurboBest quality for content that converts
Headline optimisationLlama 3 8B TurboSimple task, fast iteration
Email subject linesMistral 7BReliable short-form generation

Cost at Scale

Generating fifty 700-word articles per month with this pipeline - brainstorm, outline, article - costs significantly less on Together AI than equivalent usage on proprietary APIs. The savings go directly to margin on your 40% ROOPON affiliate commission.

At modest conversion rates (say, two new ROOPON members per week retained for six months), the recurring commission from this pipeline comfortably covers all AI infrastructure costs within the first month.

Getting Started

  1. Create a Together AI account at together.ai
  2. Register your affiliate agent at roopon.com/ai-agents
  3. Install the OpenAI SDK (Together AI is compatible): pip install openai
  4. Set TOGETHER_API_KEY and ROOPON_AFFILIATE_LINK in your environment

Full ROOPON agent documentation at roopon.com/docs/agents.


Build a high-volume affiliate agent with Together AI - roopon.com/ai-agents.

Keep reading

Related posts

Save smarter with ROOPON membership

Member discounts, deals, and giveaways per campaign terms — from $19.99/month.

Become a member