Browse all docs & guides
On this page
CORE CONCEPTS

Regional Routing & Privacy

OpenGen keeps endpoint region, inference scope, processing regions, and storage residency strictly distinct. Every catalog route attaches a PublicPrivacyDisclosure where unestablished residency, logs, retention, and Zero Data Retention facts stay null. All user prompts, inputs, and outputs remain workspace-private with no public gallery and on-demand output purging.

Reviewed 2026-12-02
AGENT PROMPT · PASTE INTO YOUR AGENT OR AUTO-READ
Apply regional routing and privacy checks before submitting OpenGen generations using https://opengen.dev/docs/regional-routing:
1. Inspect route privacy disclosures via GET https://opengen.dev/v1/models/{provider}/{model} or GET https://opengen.dev/v1/routes (or MCP get_model). Never infer processing residency, storage residency, or Zero Data Retention from endpointRegion or optional provider headers alone — check whether each fact's value is non-null with dated evidence.
2. Constrain execution explicitly with either routeId (exact pinned route) or routing ({ providerIds, deploymentIds, endpointRegions, processingRegions, processingScopes, authorOnly, preference, fallback }).
3. Run POST https://opengen.dev/v1/pricing/estimate (or MCP estimate_cost) with those routing constraints to confirm an eligible route and spend ceiling before asking the user to approve and submitting with an Idempotency-Key.
View raw .md ↗

Endpoint region is not data residency

Many media gateways conflate an API hostname with where inference runs or where assets are stored. OpenGen separates four distinct attributes on every deployment and route:

FieldMeaningObserved Values in Catalog
endpointRegionGeographic region where the provider's API HTTP endpoint terminatesap-southeast-1, ap-northeast-1, eu-central-1, us-east-1, cn-beijing, cn-hongkong, or undisclosed
inferenceScope (deployment.scope)Provider's documented routing scope for that endpointregional, mainland-china, international, global, or undisclosed
processingRegionsVerified regions where model inference actually executesArray of region codes, or **null** when not established
storageRegionsVerified regions where provider-side inputs/outputs are storedArray of region codes, or **null** when not established

Public supplier privacy disclosures (privacyDisclosure)

Every route returned by GET /v1/routes, GET /v1/models/{provider}/{model}, GET /v1/collections/{slug}, and MCP get_model includes a privacyDisclosure object. Each privacy fact is represented as { "value": <value | null>, "evidence": { "source": "https://...", "checkedAt": "YYYY-MM-DD", "status": "documented" | "live-verified" } | null }.

Whenever a provider has not established a guarantee at the public catalog level, OpenGen sets **value: null and evidence: null** rather than guessing:

  • endpointRegion and inferenceScope (populated when documented, null when undisclosed)
  • processingRegions and storageRegions (null unless explicitly qualified)
  • payloadHistory ("disabled" | "enabled" | null)
  • deploymentLogs ("disabled" | "enabled" | null)
  • maxDataRetentionSeconds (integer seconds or null)
  • zeroDataRetention (boolean or null)
  • controls: documented opt-in provider controls (payloadHistoryOptOut, outputExpiryControl, privateOutputAcl)
  • notes: plain-language caveats summarizing what is and is not established

Request-level routing controls

You can control route selection on POST /v1/pricing/estimate, POST /v1/generations, and MCP estimate_cost / generate in two ways:

  1. **Pin one exact route (routeId)**: Pass "routeId": "alibaba/ap-southeast-1/wan-3.0" (or another canonical ID from GET /v1/routes) to lock execution to that exact deployment and model.
  2. **Declarative constraints (routing)**: Filter candidate routes and choose ranking and fallback behavior:
  • providerIds: restrict to specific serving providers (e.g., ["alibaba", "byteplus"]).
  • deploymentIds: restrict to specific regional deployments (e.g., ["alibaba-model-studio-ap-southeast-1"]).
  • endpointRegions: restrict by API endpoint region (e.g., ["ap-southeast-1", "ap-northeast-1"]).
  • processingRegions: require qualified processing residency regions (fails with 422 no_executable_route if no route establishes them).
  • processingScopes: restrict by deployment.scope ("regional", "mainland-china", "international", "global", "undisclosed").
  • authorOnly: boolean — when true, restrict serving routes strictly to the model creator's own authorProviderIds (for example OpenAI for GPT Image 2 or Alibaba for Wan 3.0).
  • fidelity: "any" or "native".
  • preference: "cost", "speed", or "reliability".
  • fallback: boolean — set false to prevent automatic failover to another candidate route if the primary route fails before dispatch.
# Pin Alibaba Model Studio Singapore with no cross-region fallback
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": "alibaba/wan-3.0",
    "operation": "text-to-video",
    "input": {
      "prompt": "Slow dolly shot over rain-slicked granite courtyard at dawn",
      "resolution": "480p",
      "duration": 5,
      "aspectRatio": "16:9"
    },
    "routing": {
      "authorOnly": true,
      "endpointRegions": ["ap-southeast-1"],
      "fallback": false,
      "preference": "cost"
    }
  }'

Workspace governance policies

Workspace administrators can attach reusable routing policies (modelIds, modelProviderExceptions, authorOnly, providerIds, deploymentIds, endpointRegions, processingRegions, processingScopes, fidelity, fallback, plus maxCostMicros) to API keys in /app/keys. OAuth grants inherit the intersection of the authorizing credential's policy snapshot and current policy. Request-level routing can only narrow a governance policy — attempting to route outside it returns 403 policy_denied.

Workspace privacy and owned media delivery

All user generations, prompts, uploaded inputs, outputs, receipts, and metadata are strictly private to the owning workspace:

  • No public gallery: OpenGen has no public generation feed, share/publish operation, visibility toggle, or private-content SEO.
  • No leaked provider URLs: Raw upstream provider output URLs remain internal recovery data (upstreamId is always null and storageKey is stripped on customer responses).
  • First-party signed private capabilities: Delivered outputs use query-free HMAC-signed URLs (https://opengen.dev/media/v1.<payload>.<hmac>.<ext>) served with Cache-Control: private, no-store, Content-Security-Policy: default-src 'none'; sandbox, Cross-Origin-Resource-Policy: cross-origin, Referrer-Policy: no-referrer, X-Content-Type-Options: nosniff, and X-Robots-Tag: noindex, nofollow, noarchive.
  • On-demand output purge: Call DELETE /v1/generations/{id}/outputs (or MCP purge_job_outputs / opengen job purge-outputs <id>) on any terminal settled job to permanently delete retained output bytes and immediately invalidate all /media links (410 Gone).

See Generations Lifecycle, Private Assets, and /privacy for full operational details.