Batch Pipeline

Process millions of products through multi-stage AI pipelines — the core of AizelCommerce's volume capability.

Overview

The Batch Pipeline chains multiple modules into a single execution flow. One API call can analyze, optimize, and generate assets for your entire catalog in parallel.

Architecture: Product URL → Analysis → SEO → Creative → Video → Delivery

Full Pipeline Example

from aizel_commerce import AizelCommerce
import pandas as pd

client = AizelCommerce()
catalog = pd.read_csv("catalog_50k.csv")

# Define pipeline stages
pipeline = client.pipeline.create(
    name="Q4 Campaign Refresh",
    stages=[
        {"module": "product_analysis", "fields": ["selling_points", "pricing", "attributes"]},
        {"module": "seo", "platforms": ["amazon_us", "shopify"], "languages": ["en", "ja"]},
        {"module": "images", "styles": ["hero_shot", "lifestyle", "sale_banner"], "sizes": ["1200x1200"]},
        {"module": "copy", "formats": ["product_listing", "social_post", "ad_headline"]},
        {"module": "video", "templates": ["product_showcase"], "duration": 15}
    ],
    concurrency=100,
    priority="high"
)

# Execute on entire catalog
job = pipeline.run(products=catalog.to_dict("records"))

print(f"Job ID: {job.id}")
print(f"Total products: {job.total}")
print(f"Estimated time: {job.eta}")
print(f"Estimated assets: {job.estimated_outputs}")
# Job ID: job_a1b2c3d4
# Total products: 50,000
# Estimated time: 5h 20min
# Estimated assets: 750,000

# Monitor progress
job.wait(callback=lambda p: print(f"Progress: {p.percent}% — {p.stage}"))

Pipeline Scheduling

# Schedule recurring pipeline runs
schedule = client.pipeline.schedule(
    pipeline_id=pipeline.id,
    cron="0 2 * * 1",  # Every Monday at 2am
    catalog_source="https://your-api.com/catalog.json",
    notify=["team@company.com"]
)

Cost Estimation

# Estimate before running
estimate = pipeline.estimate(product_count=50000)
print(f"Estimated cost: ${estimate.total_cost:.2f}")
print(f"Breakdown: {estimate.per_module}")
# {'product_analysis': '$150', 'seo': '$200', 'images': '$750', 'copy': '$100', 'video': '$2000'}

On-Chain Settlement

# Pay for batch jobs via AgentPay smart contract
pipeline = client.pipeline.create(
    ...,
    payment={
        "mode": "on_chain",
        "chain": "arbitrum",
        "escrow": True,  # Funds held until delivery verification
        "max_budget": 5000  # USD cap
    }
)

results matching ""

    No results matching ""