Estimate an image campaign's cost from Sume's endpoint pricing

Read the pricing lines from GET /v1/images/models/{id}/endpoints and multiply by n. Per-image models are exact; token-priced models need a different estimate.

4 min readSume
All posts

To estimate a campaign, read the pricing array from GET /v1/images/models/{model_id}/endpoints and multiply cost_usd by the number of images. Sume's docs say endpoint pricing is the amount charged to your wallet, with Sume's margin already applied, so cost_usd x n is what you pay. That holds for per-image lines; token-priced models do not reduce to one number.

Model launches keep changing the shortlist: Higgsfield lists FLUX 3 Image on 2026-10-01 and Ideogram 4.5 on 2026-09-30 (Higgsfield changelog, read 2026-10-02). Re-run the estimate whenever you change a model id.

What does a pricing line look like?

Each endpoint record has pricing lines with a billable, a unit, and cost_usd. The docs' example for Seedream 4.5 shows one output_image line at 0.033 dollars per image; that figure is the docs' example, not a quote to rely on, so read your own catalog.

Pricing fields in Sume's Image API docs, read 2026-10-02
FieldMeaning
billableWhat is charged, for example output_image
unitUnit of the line, for example image
cost_usdAmount charged to your wallet, margin included

How do I script it?

The script sums per-image lines and flags any other unit, so a token-priced model never produces a silent wrong number.

import os
import requests

MODEL = "bytedance-seed/seedream-4.5"
IMAGES = 200
URL = f"https://api.sume.com/v1/images/models/{MODEL}/endpoints"
HEADERS = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}

r = requests.get(URL, headers=HEADERS, timeout=30)
r.raise_for_status()
total = 0.0
for endpoint in r.json().get("endpoints", []):
    for line in endpoint.get("pricing", []):
        if line.get("unit") == "image":
            total += line["cost_usd"] * IMAGES
        else:
            print("needs a manual estimate:", line)
print(f"{MODEL}: {IMAGES} images = {total:.2f} USD")

What about ChatGPT Image 2.5?

It prices by tokens: the docs list 30 dollars per million output image tokens, 8 per million input image tokens, and 5 per million input text tokens, with output estimates from OpenAI's size and quality calculator. At 1024 by 1024, xhigh output is 0.09366 dollars and max is 0.21072 dollars before input tokens and Sume pricing. auto quality reserves max, so set quality explicitly when you budget. A balance that cannot cover the reservation returns 402 insufficient_credits before work starts. See Image API and Errors.

Sources

Related posts

More in Pricing

All Pricing posts

Written by Sume