Single-source micro-USD pricing
OpenGen represents every price, reservation, settlement, and balance as an exact integer in micro-USD, where **1 USD = 1,000,000 micro-USD** ($0.01 = 10,000 micro-USD; $0.00598 = 5,980 micro-USD).
- Single source of truth: All per-unit
rates,publishedPricing, and dated credential-free HTTPSpricingSourcelinks are defined once in@media-router/catalogand projected identically acrossGET /v1/pricing,GET /v1/routes,GET /v1/models/{provider}/{model}, MCPget_model/opengen://pricing,@opengen-dev/cli, /pricing, and every/[provider]/[series]page (plus its.mdtwin). - Modality-matched billing units:
image,output-second,character-1k, andmegapixel. - Honest unknowns: When a provider does not publish a deterministic per-request formula or a route has media-dependent token billing, OpenGen keeps prices
nullor omitted — never$0or "free".
Interpreting series-page Pricing at a Glance
Every model series page (/[provider]/[series], such as /bytedance/seedance-2.5 or /alibaba/wan-3.0) and its Markdown twin (/[provider]/[series].md / Accept: text/markdown) includes an above-the-fold Pricing at a Glance prose lead and Provider | Unit Price | Cost per 1,000 ... | Region summary table derived strictly from @media-router/catalog:
- Starting list rate per provider: Each provider row reports that provider's lowest published starting rate across active (non-retired) routes in the series, labeled with the exact variant and default resolution/quality tier it represents. Rates marked with
≈are approximate or token-derived estimates; providers with unpriced or mixed-unit routes showUnknown(—for per-1,000 cost) rather than$0. - Exact-unit per-1,000 column: The per-1,000 column (
Cost per 1,000 images,Cost per 1,000 sec,Cost per 1,000 MP, orCost per 1,000 (1M chars)) is computed only when all priced variants in the series share a common billing unit and the provider row matches that unit; mixed-unit or unpriced rows fall back toCost per 1,000with—and are never cross-unit sorted. - Exact variant boundaries:
Lowestbadges and cross-provider savings percentages compare only providers serving the **same exactmodelIdand billing unit** when at least two providers quote different positive rates — never across distinct derivatives (such asFastvsStandard). - Regional spread and unified review date: Region cells show disclosed endpoint regions for the provider's lowest rate and distinguish higher-priced regions (
+SG higher), regions serving other variants (+... other variants), and unpriced regions (+... unpriced) without implying data residency. TheChecked YYYY-MM-DD/Latest catalog source checkdate is unified across the HTML summary, Markdown twin, JSON-LD, and sitemap. - Not an executable quote or spend cap: Summary starting rates include
documentedcatalog routes and lowest default tiers. Higher resolutions, audio-on tiers, edit operations, or regional pins can cost more, and route executability depends on the target gateway and workspace policy. Always inspectGET /v1/models/{provider}/{model}?operation=<op>(or MCPget_model) and run statelessPOST /v1/pricing/estimate(or MCPestimate_cost) with the exact canonical request before approving spend or settingmaxCostMicros.
Pricing and account endpoints (4 routes)
| Endpoint | Operation ID | Auth | Purpose |
|---|---|---|---|
GET /v1/pricing | pricing.list | Public (max-age=60, s-maxage=300) | Lists published per-unit route rates, publishedPricing, pricingSource, operationPricing, and status / liveVerification. Filters: modelId, routeId, providerId, endpointRegion, modality, operation |
POST /v1/pricing/estimate | pricing.estimate | Public or read (CORS *) | Stateless, side-effect-free dry-run estimator. Validates the exact generation request, returns per-route estimatedCostMicros, recommendedMaxCostMicros, reservationMicros, estimateOnly: true, and workspaceEligibility when authenticated. Never reserves credits or creates a quote ID |
GET /v1/balance | balance.get | read (no-store) | Returns { availableMicros, reservedMicros, currency: "USD" }. Supports optional X-OpenGen-Expected-Workspace header (409 workspace_changed on mismatch). MCP balance adds workspaceId, plus billingUrl and minTopUpUsd (5) when hosted top-ups are enabled |
GET /v1/analytics | analytics.get | read (no-store) | Bounded private workspace spend (settledMicros, heldMicros, unknownAccountingCount, byKey, byTag) and per-model/route reliability & latency cohorts (p50Ms, p95Ms) over a date window up to 31 days (default last 7 days) |
Querying published tariffs and running dry-run estimates
# Inspect published pricing across all serving providers for one exact variant
curl --fail-with-body \
"$OPENGEN_API_URL/v1/pricing?modelId=openai%2Fgpt-image-2&operation=text-to-image"
# Stateless dry-run cost and route-eligibility estimate (no credit hold)
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/pricing/estimate" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"modelId": "openai/gpt-image-2",
"operation": "text-to-image",
"input": {
"prompt": "Technical isometric diagram of a copper espresso boiler",
"resolution": "1K",
"quality": "low"
},
"billing": "managed"
}'Managed credit vs BYOK (Bring Your Own Key)
| Dimension | Managed Credit ("billing": "managed") | Bring Your Own Key ("billing": "byok") |
|---|---|---|
| Provider credentials | OpenGen-operated supplier accounts | Your own encrypted provider keys stored per deployment in /app/providers |
| Funding & billing | Prepaid USD workspace balance via /billing (new workspaces start at $0; $5 USD minimum top-up) | Provider bills your supplier account directly; OpenGen reserves $0 managed credit |
| Reservation & ceiling | Reserves a bounded reservedMicros ceiling at admission, settles actual settledMicros, and releases unused hold back to availableMicros | No managed credit reservation; still enforces governance routing policies and workspace isolation |
| Spend guards | Request maxCostMicros, key monthlyCapMicros, and policy maxCostMicros | Governance routing policy (modelIds, providerIds, endpointRegions) |
Workspace balance and 31-day analytics (GET /v1/analytics)
GET /v1/analytics (and MCP analytics) provides private operational visibility across a bounded window of at most 31 days (defaulting to the last 7 days when since/until are omitted). Filter by since (inclusive ISO-8601 UTC), until (exclusive ISO-8601 UTC), modelId, providerId, deploymentId, endpointRegion, operation, keyId, status, or project.
Each response returns:
- Top-level accounting:
sampleCount,settledMicros,heldMicros,unknownAccountingCount(jobs whose accounting is unsettled/unknown rather than silently treated as zero), plus truncation indicators (truncated,attributionTruncated,tagsTruncated). - Spend attribution:
byKey[](per API key ID) andbyTag[](permetadata.tagskey/value pair). - **Per-route cohorts (
cohorts[])**: grouped bymodelId,operation,routeId,deploymentId, andconfigurationFingerprint, reportingsucceeded,failed,cancelled,unresolved,delivered,unverifiedDelivery, and observedp50Ms/p95MsacrossproviderOutcomeLatency,queueLatency,executionLatency,deliveryLatency, andendToEndLatency.
# Check workspace balance
curl --fail-with-body "$OPENGEN_API_URL/v1/balance" \
-H "Authorization: Bearer $OPENGEN_API_KEY"
# Query 7-day workspace spend and latency analytics for a project
curl --fail-with-body \
"$OPENGEN_API_URL/v1/analytics?project=catalog-hero&since=2026-11-25T00:00:00Z&until=2026-12-02T00:00:00Z" \
-H "Authorization: Bearer $OPENGEN_API_KEY"