Core concepts
Bundles
Which models a key may reach, and at what markup.
Every key is minted under a bundle. The bundle decides which aliases that key can reach and what margin sits on top of provider cost.
Create a tier
seams bundles add pro --name Pro --price 29/month
# slug pro
# price $29.00/monthimport { Seams } from "@ourseams/sdk"
const seams = new Seams({ apiKey: process.env.SEAMS_API_KEY! })
await seams.bundles.create("pro", {
displayName: "Pro",
priceMicros: "29000000",
interval: "month",
})import os
from seams import Seams
seams = Seams(api_key=os.environ["SEAMS_API_KEY"])
seams.bundles.create(
"pro",
display_name="Pro",
price_micros="29000000",
interval="month",
)Allow models and set a spend limit
seams bundles allow pro app/fast app/smart
seams bundles edit pro --spend-limit 50/month
seams bundles show proawait seams.bundles.allow("pro", { models: ["app/fast", "app/smart"] })
await seams.bundles.edit("pro", {
spendLimitMicros: "50000000",
spendLimitPeriod: "month",
})
await seams.bundles.show("pro")seams.bundles.allow("pro", models=["app/fast", "app/smart"])
seams.bundles.edit(
"pro",
spend_limit_micros="50000000",
spend_limit_period="month",
)
seams.bundles.show("pro")Deny a model or remove the bundle
seams bundles deny pro app/vision
seams bundles rm pro --yesawait seams.bundles.deny("pro", { models: ["app/vision"] })
await seams.bundles.rm("pro")seams.bundles.deny("pro", models=["app/vision"])
seams.bundles.rm("pro")Alias matching
Three pattern forms, and never a regex: an exact alias, a prefix with a trailing wildcard, or a bare wildcard for everything the customer owns.
app/smart exact
app/* every alias in this namespace
* everythingWrite-time validation, so a request only does a plain lookup. A bundle that names a model that does not exist is refused when it is saved, not when a request arrives.
Routers ride along
Allow aliases on the bundle, not router names. After those aliases are allowed, creating a router whose targets are all on this bundle attaches the router here automatically. Callers then use the router slug or any allowed alias. See Routers for the create step.
Pricing lives here too
Markup and sell prices on the bundle are how usage-based margin is set. Subscription price and includes are how plans mint allotments. For the full map of strategies, usage, prepaid, plans, outcomes, resell, see Pricing strategies.