# Frequently Asked Questions

> Concise technical answers to the most common questions about OpenGen's privacy guarantees, idempotent timeout recovery, micro-USD billing and null settlement states, managed credit versus BYOK, endpoint regions versus data residency, Ed25519 webhook verification, zero-auth read-only MCP discovery, and how OpenGen compares to fal.ai and Replicate.

## Agent Prompt

```text
Consult https://opengen.dev/docs/faq to answer operational, billing, privacy, and architecture questions about OpenGen accurately:
1. Never tell users that outputs are public, that null prices or settledMicros: null mean free, that cancelling a running job guarantees a refund, or that endpointRegion guarantees data residency or Zero Data Retention.
2. Always direct lost-submit or timeout recovery to read-only GET https://opengen.dev/v1/generations/lookup?idempotencyKey=... or MCP job_get({ idempotencyKey }) rather than minting a new Idempotency-Key.
3. Direct zero-auth model discovery and cost estimation to https://opengen.dev/mcp/readonly or POST https://opengen.dev/v1/pricing/estimate, and require explicit spend confirmation before calling POST https://opengen.dev/v1/generations.
```

## Are my prompts, inputs, and generated outputs private, or is there a public gallery?

Every prompt, uploaded input asset, generation job, output file, receipt, and metadata tag is strictly private to the owning workspace and its authorized credentials. OpenGen has no public generation gallery, no share or publish toggle, and no private-content SEO. Raw provider output URLs remain internal recovery data, customer downloads use short-lived first-party signed `/media/v1....` links with `Cache-Control: private, no-store` and `X-Robots-Tag: noindex, nofollow, noarchive`, and you can permanently purge retained output bytes anytime via `DELETE /v1/generations/{id}/outputs` or MCP `purge_job_outputs`.

## What happens if a generation request times out or enters submission-unknown?

Persist your `Idempotency-Key` and exact JSON request payload before calling `POST /v1/generations`, and never automatically generate a new key after a timeout or disconnect. Call read-only `GET /v1/generations/lookup?idempotencyKey=...` (or MCP `job_get({ idempotencyKey })` / `opengen job recover --idempotency-key ...`) to check whether the job was admitted. If a job enters `status: "submission-unknown"`, upstream provider acceptance could not be confirmed, so reserved funds stay held pending reconciliation and you must not submit a duplicate replacement job.

## Why is settledMicros null on a generation, and does null mean free?

All OpenGen monetary amounts use positive integer micro-USD (`1 USD = 1,000,000 micro-USD`), and `null` never means `$0` or free. On a generation job, `settledMicros: null` means actual billing settlement has not completed yet — for example while the job is queued, running, awaiting private delivery verification, or held in `submission-unknown` pending reconciliation. Similarly, in the public catalog (`GET /v1/pricing`), an omitted or `null` price means no deterministic per-request formula has been qualified for that route.

## What is the difference between managed credits and BYOK (Bring Your Own Key)?

In `"billing": "managed"` mode, you fund a prepaid USD workspace balance in `/billing` (new personal workspaces start at `$0` with a `$5` USD minimum top-up), and OpenGen reserves a bounded `reservedMicros` ceiling at admission, settles actual cost, and releases any unused hold. In `"billing": "byok"` mode, you store your own encrypted supplier API keys per regional deployment in `/app/providers`; the provider bills your supplier account directly and OpenGen reserves `$0` managed credit. Both modes share the same canonical schemas, workspace isolation, private media delivery, and governance routing policies without mixing managed and BYOK funds.

## Does choosing an endpoint region guarantee data residency or Zero Data Retention (ZDR)?

No. OpenGen separates `endpointRegion` (where the provider's API HTTP endpoint terminates), `inferenceScope` (`regional`, `mainland-china`, `international`, `global`, or `undisclosed`), `processingRegions`, and `storageRegions`. Every route attaches a `privacyDisclosure` object where unestablished processing residency, storage residency, payload history, deployment logs, retention caps, and Zero Data Retention (`zeroDataRetention`) remain `null` with `evidence: null`. Optional provider headers such as fal's `X-Fal-Store-IO: 0` are documented as opt-out controls and never establish ZDR or regional residency.

## How do I verify OpenGen webhook signatures?

Pass a public HTTPS `webhookUrl` (port 443) and optional `webhookEvents` on `POST /v1/generations` or MCP `generate`, then fetch OpenGen's public Ed25519 verification keys from `GET /.well-known/webhook-jwks.json`. On each inbound webhook `POST`, read the exact raw UTF-8 body before JSON parsing, check the five `X-OpenGen-Webhook-*` headers (`Request-Id`, `Workspace-Id`, `Timestamp`, `Key-Id`, `Signature`), enforce a replay window such as `±300` seconds, and verify the 128-character lowercase hex Ed25519 signature over `${requestId}\n${workspaceId}\n${timestamp}\n${sha256Hex(rawBody)}`. See [Webhooks & Ed25519 Verification](/docs/webhooks) for copy-paste Node.js and Python verifiers.

## Can AI agents and IDEs inspect OpenGen models over MCP without signing in?

Yes. OpenGen serves a read-only Streamable HTTP MCP endpoint at `/mcp/readonly` where `initialize`, `tools/list`, `resources/*`, `prompts/*`, public `opengen://` resources, and four discovery tools (`find_models`, `get_model`, `estimate_cost`, and `search_docs`) work with zero authentication, wildcard CORS (`Access-Control-Allow-Origin: *`), and standard `curl`/`fetch` `Accept` headers without `406` errors. Workspace-private reads (`balance`, `analytics`, `job_get`, `jobs_list`, `assets_list`) require `read` auth on `/mcp/readonly` (with RFC 9728 metadata at `/.well-known/oauth-protected-resource/mcp/readonly`), while write and billable tools require `/mcp` with `generate` scope.

## How does OpenGen differ from fal.ai and Replicate?

fal.ai and Replicate are individual model-hosting inference providers, whereas OpenGen is an Apache-2.0 open-source regional multi-provider gateway and canonical schema router spanning 12 serving providers — including fal and Replicate alongside OpenAI, Google, Alibaba Cloud, BytePlus, Kling AI, MiniMax, Black Forest Labs, xAI, Runway, and Pika. OpenGen keeps exact model variant IDs intact without merging derivatives, exposes side-by-side dated pricing and honest privacy disclosures across official and third-party routes, enforces workspace-private signed delivery with no public gallery, and lets you switch between managed credits and BYOK without rewriting your application schema.

## Does cancelling a running generation guarantee a refund?

No. Calling `POST /v1/generations/{id}/cancel` (or MCP `job_cancel`) on a locally `queued` job cancels it immediately (`200 OK`, `cancellationState: "confirmed"`) and releases the full reservation. Calling cancel on an already `running` upstream task returns `202 Accepted` (`cancellationState: "requested"`) and forwards a cancellation request when supported by the provider, keeping reserved credits held until terminal billing confirms whether the provider cancelled without charge.

## What are the file size limits for uploading private input assets?

Through the unified `POST /v1/assets` endpoint, single-step `multipart/form-data` uploads (`file` part) support up to `4 MiB`, REST JSON `base64` uploads support up to `3 MiB` decoded, and presigned single-PUT uploads (`POST /v1/assets` followed by direct storage `PUT` and `POST /v1/assets/complete`) as well as bounded public HTTPS URL imports (`source: "url"`) support up to `100 MiB`. Over MCP, `upload_asset` caps inline `base64` strictly at `64 KiB` to protect LLM context windows and provides `source: "url"`, `source: "job_output"`, `upload_attachment`, and `presign_prepare` / `presign_complete` for larger files.

## Does OpenGen publish official TypeScript or Python SDKs?

Standalone third-party SDK distribution and language-specific framework adapters are deferred. Instead, OpenGen maintains an authoritative OpenAPI `3.1.0` contract (`GET /openapi.json`), raw HTTP examples using standard `curl`, `fetch`, and Python `httpx`, Streamable HTTP MCP servers (`/mcp` and `/mcp/readonly`), and a published zero-dependency portable CLI ([`@opengen-dev/cli`](https://www.npmjs.com/package/@opengen-dev/cli) on npm).

## Are all 184 routes in the catalog live-verified on opengen.dev?

No. OpenGen explicitly distinguishes `live-verified` routes (`19` routes across all `12` providers carrying scoped `liveVerification` operation, resolution, duration, and date metadata) from `documented` routes (`165` catalog routes documented from primary provider sources). Always inspect `route.status`, `route.liveVerification`, and `POST /v1/pricing/estimate` (`selectedRouteId`, `candidates[].executable`, and `workspaceEligibility`) before submitting paid traffic on a route.
