AI ReelsImage to VideoFLUX 2 EditKling 2.6SMM Automation

A Week of Reels From 1 Product Photo Costs $3.01. Two API Defaults Make It $6.99.

7 vertical clips from 1 product photo cost $3.01. Leave 2 API settings at their defaults and the same 7 clips cost $6.99, starting with a phone photo that bills as 13 megapixels before the model draws anything.

2026-11-13·9 min read

This is a content pipeline for one job: a brand, a shop or a creator has 1 good product photo and needs a Reel, a TikTok or a Short every day of the week. Here is what it produces, what each step costs at today’s prices on MegaBrain’s model pages, and the 2 settings that more than double the bill without changing a single frame you’d notice.

The pipeline: 1 photo, 3 models, 7 clips

  • Plan (text model). Gemini 3.8 Flash reads a one-line brief (“sage green ceramic mug, cozy autumn mornings”) and returns 7 scenes, 7 camera moves and 7 captions as JSON. One call for the whole week.
  • Stage (image edit). FLUX 2 Edit puts the real product into each scene: a windowsill at dawn, a desk with a laptop, a picnic blanket. The product photo goes in as the reference, so the label and shape come from your photo, not from a model’s guess.
  • Animate (image to video). Kling 2.6 Pro turns each still into a 5-second clip with one slow camera move: a push-in, a pan, a slow orbit.
  • Post. You add trending audio and text in the Reels, TikTok or CapCut editor, where the platforms want you to pick sound anyway.

The output is 7 vertical clips and 7 captions in a folder. That is the asset a social calendar runs on.

The cost of 1 finished clip, step by step

FLUX 2 Edit costs $0.0138 per megapixel, but the model page says exactly what counts: every started megapixel of the output and of each input image. A 576×1024 vertical output is 589,824 pixels, 1 started megapixel. A 1-megapixel product photo adds 1 more. That still costs $0.0276.

Kling 2.6 Pro image to video costs $0.0805 per second without sound, so a 5-second clip costs $0.4025. The model page lists 2 lengths, 5 or 10 seconds, and a generate_audio switch that defaults to true. With sound, the price is $0.161 per second.

StepSettingsCarefulDefaults left on
Still: FLUX 2 EditOutput 576×1024; input 1 MP vs a 4032×3024 phone photo2 MP × $0.0138 = $0.027614 MP × $0.0138 = $0.1932
Clip: Kling 2.6 Pro, 5 sgenerate_audio false vs true (default)5 × $0.0805 = $0.40255 × $0.161 = $0.805
1 finished clip$0.4301$0.9982
7 clips (1 week)$3.0107$6.9874

Where the extra $3.98 goes. A 4032×3024 photo, the size many phones shoot, has 12,192,768 pixels: 13 started megapixels of input on every edit, 7 times a week. Sound on doubles every clip. Neither one changes what you post if you replace the audio in the app.

The text call is the cheapest part. Gemini 3.8 Flash costs $1.73 per million input tokens and $8.63 per million output tokens on MegaBrain, and the script prints the exact token counts from the usage field so you can see your own number. For scale: a call with 400 tokens in and 1,200 out would cost $0.011048.

Other model choices, same week

Swap a model and the math changes, so here are the alternatives that slot into the same script without touching its structure. All prices are per 1 clip from 1 still; the week is 7 of them.

StillClip1 clip7 clips
FLUX 2 Edit, 1 MP inputKling 2.6 Pro, 5 s, no sound$0.4301$3.0107
Nano Banana EditKling 2.6 Pro, 5 s, no sound$0.4483$3.1381
FLUX 2 Edit, 1 MP inputKling 3.0 Standard, 5 s, no sound$0.5106$3.5742
FLUX 2 Edit, 1 MP inputKling 2.6 Pro, 10 s, no sound$0.8326$5.8282
FLUX 2 Edit, 12 MP inputKling 2.6 Pro, 5 s, sound on$0.9982$6.9874

Nano Banana Edit costs a flat $0.0458 per image whatever the input size, and it takes up to 10 input images, so it is the easy choice when you want to pass the front and the back of a box. Kling 3.0 Standard costs $0.0966 per second without sound and takes any length from 3 to 15 seconds, so a 3-second loop costs $0.2898. One more number worth knowing: a silent 10-second Kling 2.6 Pro clip costs $0.805, exactly what a 5-second clip with sound costs.

The script

About 100 lines of Python, using the queue pattern from the media API docs and the OpenAI SDK for the text call. One key covers all 3 models.

"""reels_week.py: 1 product photo + 1 brief -> 7 vertical clips and captions.

Usage: python reels_week.py mug.jpg "ceramic coffee mug, cozy autumn mornings, slow living"
"""
import base64
import io
import json
import os
import sys
import time

import requests
from openai import OpenAI
from PIL import Image

BASE = "https://getmegabrain.com/api/gateway/v1"
KEY = os.environ["MEGABRAIN_API_KEY"]
HEADERS = {"Authorization": f"Bearer {KEY}"}
llm = OpenAI(base_url=BASE, api_key=KEY)


def shrink_to_data_uri(path, max_pixels=1_000_000):
    """FLUX 2 Edit bills every started megapixel of the input: keep it at 1."""
    img = Image.open(path).convert("RGB")
    w, h = img.size
    if w * h > max_pixels:
        scale = (max_pixels / (w * h)) ** 0.5
        img = img.resize((int(w * scale), int(h * scale)), Image.LANCZOS)
    buf = io.BytesIO()
    img.save(buf, "JPEG", quality=92)
    return "data:image/jpeg;base64," + base64.b64encode(buf.getvalue()).decode()


def run(model, payload):
    """Submit a job to the queue and wait for the result."""
    res = requests.post(f"{BASE}/queue/{model}", headers=HEADERS, json=payload)
    res.raise_for_status()
    job = res.json()
    while True:
        status = requests.get(job["status_url"], headers=HEADERS).json()["status"]
        if status in ("COMPLETED", "FAILED"):
            break
        time.sleep(3)
    if status == "FAILED":
        raise RuntimeError(f"{model} failed and was refunded: {job['request_id']}")
    return requests.get(job["response_url"], headers=HEADERS).json()


def plan_week(brief):
    """One text call writes 7 scenes, 7 camera moves and 7 captions."""
    reply = llm.chat.completions.create(
        model="google/gemini-3.8-flash",
        messages=[
            {
                "role": "system",
                "content": (
                    "You plan a week of Instagram Reels for one product. Return only a JSON "
                    "array of 7 objects with keys: scene (one sentence: the setting and light "
                    "for a product photo, no people, no logos), motion (one slow camera move "
                    "for a 5-second clip), caption (under 150 characters, 2 hashtags)."
                ),
            },
            {"role": "user", "content": brief},
        ],
    )
    text = reply.choices[0].message.content
    print("tokens:", reply.usage.prompt_tokens, "in,", reply.usage.completion_tokens, "out")
    return json.loads(text[text.find("[") : text.rfind("]") + 1])


photo = shrink_to_data_uri(sys.argv[1])
week = plan_week(sys.argv[2])
os.makedirs("week", exist_ok=True)

for day, post in enumerate(week[:7], start=1):
    still = run("flux-2/edit", {
        "prompt": (
            f"Place this exact product in a new scene: {post['scene']} "
            "Keep the product's shape, label and colors unchanged. Vertical photo."
        ),
        "image_urls": [photo],
        "image_size": "portrait_16_9",  # 576x1024: 1 started megapixel
        "output_format": "jpeg",
    })["images"][0]["url"]

    clip = run("kling-video/v2.6/pro/image-to-video", {
        "prompt": f"{post['motion']} The product stays sharp and unchanged.",
        "start_image_url": still,
        "duration": "5",
        "generate_audio": False,  # the default is true, at 2x the price
    })["video"]["url"]

    with open(f"week/day{day}.mp4", "wb") as f:
        f.write(requests.get(clip).content)
    with open(f"week/day{day}.txt", "w") as f:
        f.write(post["caption"])
    print(f"day {day}: {clip}")

Run it:

pip install requests openai pillow
export MEGABRAIN_API_KEY="your key"
python reels_week.py mug.jpg "ceramic coffee mug in sage green, cozy autumn mornings, slow living"

The photo travels as a data: URL. Both image_urls and start_image_url accept https:// or data: URLs, so nothing needs hosting. The edit result’s URL goes straight into Kling as the start frame.

Make the start frame vertical. Kling’s image-to-video endpoint takes no aspect-ratio field, so the 9:16 shape has to come from the still. That is why the edit asks for portrait_16_9.

Failed jobs cost nothing. If a generation fails on the provider side, its status is FAILED and the price goes back to your balance. The script raises an error so you can rerun that day.

Prompts for the 2 media steps

  • Tell the edit what to keep. “Keep the product’s shape, label and colors unchanged” is in the script for a reason: without it, an edit model is free to redesign your packaging.
  • 1 motion per clip. “Slow push-in toward the mug” works. “Orbit the mug while steam rises and the light changes” gives the model 3 jobs and 5 seconds.
  • No people in the plan. The system prompt bans them. Hands and faces are where 5-second image-to-video clips break first, and a product clip doesn’t need them.
  • Vary the setting, not the product. 7 scenes with different light and surfaces read as a series. 7 versions of the same table read as a glitch.

Automate it: every Monday, no clicks

The script is 3 HTTP patterns, so it runs anywhere. Put it in cron for Monday 7:00, or rebuild it in n8n or Make with an HTTP Request node, a Wait node and a loop on the status URL.

If you already run an assistant in Telegram or Slack, give it the script as a skill and a weekly job: “Every Monday at 7, run reels_week.py with this week’s brief and send me the 7 clips.” The Hermes Agent guide and the OpenClaw guide show how to connect each agent to the same API key, with cron and chat apps covered.

To build the script yourself in Cursor, Claude Code or Codex, paste this prompt. The Claude Code guide and the Codex guide show how to run either agent on the same MegaBrain key.

Build a Python CLI, reels_week.py, that turns 1 product photo and a short brief
into 7 vertical 5-second video clips plus 7 captions, using the MegaBrain API.

API: base URL https://getmegabrain.com/api/gateway/v1, header
Authorization: Bearer $MEGABRAIN_API_KEY. Docs: https://getmegabrain.com/docs/media
and https://getmegabrain.com/docs/gateway.

Steps:
1. Resize the photo with Pillow so width x height <= 1,000,000 pixels and send it
   as a base64 JPEG data: URL (FLUX 2 Edit bills each started megapixel of input).
2. Call google/gemini-3.8-flash through the OpenAI SDK (base_url = the API base)
   for a JSON array of 7 {scene, motion, caption}. No people, no logos.
3. For each day: POST /queue/flux-2/edit with image_urls=[photo],
   image_size="portrait_16_9"; then POST /queue/kling-video/v2.6/pro/image-to-video
   with start_image_url = the edit result, duration "5", generate_audio false.
4. Poll status_url every 3 s until COMPLETED or FAILED, then GET response_url.
5. Save week/dayN.mp4 and week/dayN.txt. Print the token usage of step 2.
Keep it in one file, under 120 lines, with clear errors when a job fails.

What this means for your content

Budget per finished asset, not per generation. “$0.0138 per megapixel” and “$0.0805 per second” say little until you multiply them into 1 clip you would post. Here that number is $0.4301, and a week is $3.01.

Read the defaults before you batch. One request with sound on and a full-size photo costs $0.57 more than it needs to. A daily schedule repeats that 365 times a year.

Spend the savings on choice. At $0.4301 a clip, making 2 versions of each day and posting the better one still costs less than the default settings do for 1. The second take is where most of the quality comes from.

If you’d rather start with 1 clip than a week, our earlier tutorial builds a single product clip in 2 API calls.

Try it on MegaBrain. Every model in this post runs from 1 key and 1 pay-as-you-go balance, with a playground on each model page: FLUX 2 Edit at $0.0138 per megapixel, Kling 2.6 Pro image to video at $0.0805 per second without sound.

Full disclosure: MegaBrain sells pay-as-you-go API access to image, video and text models, including FLUX 2 Edit, Nano Banana Edit, Kling 2.6 Pro, Kling 3.0 Standard and Gemini 3.8 Flash. MegaBrain is not affiliated with Black Forest Labs, Google, Kuaishou, Anthropic, OpenAI, Meta, TikTok or CapCut.

Sources

Pages opened November 13, 2026. All prices are MegaBrain’s, from the model pages and the price list on that day; per-clip and per-week totals are our arithmetic from them.

MegaBrain for Mac · an AI coworker

Give MegaBrain the task, not the steps.

It works on your files, writes documents, spreadsheets and decks, connects to your team’s tools and asks before anything risky. Free to start.

Newsletter

Stay in the loop

Get our latest AI research and guides. No spam, unsubscribe anytime.