Surfaces
The portal
Where your customers see their own usage, spend and keys.
Each application gets a portal hostname, https://<slug>.portal.ourseams.com. An end user lands there from a handoff link you mint; there is no password page of ours for them to create. The chrome uses your application name, colour and logo.
Open a session
Your backend (or the console) mints a one-time URL. Send the browser there; the portal exchanges the token for a session cookie and drops them on Overview.
seams portal link alice
# url https://<app>.portal.ourseams.com/enter?t=ps_…
seams portal open alice # opens the url in your browserimport { Seams } from "@ourseams/sdk"
const seams = new Seams({ apiKey: process.env.SEAMS_API_KEY! })
const { url, expiresAt } = await seams.portal.link({
externalId: "alice",
returnUrl: "https://app.example.com/account", // optional; shown as a link back
})
// redirect to url before expiresAtimport os
from seams import Seams
seams = Seams(api_key=os.environ["SEAMS_API_KEY"])
session = seams.portal.link(
external_id="alice",
return_url="https://app.example.com/account",
)
# redirect to session.url before session.expires_atA handoff token is single-use and lasts about a minute. Mint it when they ask to open the portal, not ahead of time.
Pages
| Page | What it shows |
|---|---|
| Overview | Available balance, holds, period usage, and recent ledger draws |
| Usage | Their calls and cost by model and by day |
| Spending | Their plan, included pools, and their own on-demand ceiling |
| Activity | The full ledger of credits and charges on their balance |
| Keys | Their ak_ prefixes, caps and spend, never the secret again |
Without a plan, Usage and Keys still work. Overview and Spending fill in once they are on a bundle.
Branding
Colour and logo are set on the customer and apply to every portal under the organization. The product name on the portal is the application name.
seams brand show
seams brand set --color '#2F6BFF' --logo https://example.com/logo.svgawait seams.brand.set({
color: "#2F6BFF",
logo: "https://example.com/logo.svg",
})
await seams.brand.show()seams.brand.set(color="#2F6BFF", logo="https://example.com/logo.svg")
seams.brand.show()What they can change
On Spending, an end user can turn on-demand overage on or off and set their own ceiling. They cannot mint keys, change branding, or see another person's usage.
seams portal on-demand alice --enable --limit 25
seams portal spending aliceawait seams.subscription.onDemand({
endUserId: "alice",
enabled: true,
limitMicros: "25000000",
})
await seams.subscription.show({ endUserId: "alice" })seams.subscription.on_demand(
end_user_id="alice",
enabled=True,
limit_micros="25000000",
)
seams.subscription.show(end_user_id="alice")Staff can set the same overage from the console or the CLI when a customer asks you to raise it for them. The portal call is what they use themselves.