THE OPERATING GUIDE

Find. Compare. Generate.

One catalog, one execution contract. A practical guide to running the gateway and connecting your applications and agents.

Start locally

Install the workspace dependencies, configure PostgreSQL and start the API, worker and website from the repository root. The repository README contains the exact database setup and environment variables.

npm install
npm run dev:api
# in another terminal
npm run worker
# in another terminal
npm run dev

The website runs on 127.0.0.1:4320. The API runs on 127.0.0.1:4310. Public discovery and published price comparison work without a provider key. Generation needs a configured route, your installation token and sufficient balance.

The catalog is the contract.

Discover a model, read its exact variant and inspect the routes before constructing a request. A family groups related models; a route identifies the exact model served by a specific provider deployment.

GET /v1/models
POST /v1/quotes
POST /v1/generations
GET /v1/generations/{id}

H3, fal H3 Max and Pika H3 Flex remain distinct variants. A provider can expose several variants and several regional deployments. The catalog does not treat a shared name as proof of identical weights.

Each route links to its original documentation and pricing evidence. Open weights and commercial usage permissions are separate properties.

A region is a selectable route.

Each documented model–regional deployment combination appears separately. Alibaba’s Wan 3.0 Standard and Prime each have documented offerings in Beijing, Singapore, Tokyo, Frankfurt, Virginia and Hong Kong.

FieldWhat it tells you
Endpoint regionWhere requests enter the provider
Inference scopeWhere the provider permits processing
Processing/storage regionsProvider-published locations, or unknown
Measurement originWhere a performance sample was taken

A Frankfurt endpoint with a Global inference scope is not an EU-only commitment. Undisclosed processing locations remain unknown. Regional prices, credentials, limits and observations are kept separate.

Pin a route ID to stay on one regional deployment. Region restrictions apply to every eligible attempt. A provider’s broad regional footprint does not imply that every model is offered everywhere.

Quote, submit, retain the ID.

Quotes show a request-specific estimate and whether this installation can execute the route. A catalog-only route can have a published price while remaining unavailable for generation here.

curl http://127.0.0.1:4310/v1/quotes \
  -H 'Content-Type: application/json' \
  -d '{
    "modelId": "alibaba/wan-3.0",
    "operation": "text-to-video",
    "prompt": "A slow tracking shot along a coastal road.",
    "resolution": "720p",
    "duration": 5,
    "maxCostMicros": 2000000
  }'

Use the canonical model ID returned by your catalog; the example must be adjusted if the ID differs. Generation is a separate, authenticated request. Send a stable Idempotency-Key with the same input when retrying a submission.

A timeout is not proof that a paid generation failed. Save the gateway job ID and poll it. Do not replace an unresolved submission with a new request key. A job can explicitly report submission-unknown while the upstream outcome is unresolved.

Provider attempts, reserved funds and settlement are separate records. Requesting cancellation does not establish that the provider cancelled or refunded the generation.

Give your agent one doorway.

Point the agent at the gateway’s /llms.txt. It describes discovery, quoting, generation and how to recover an interrupted wait.

npm run cli -- catalog search "wan 3.0"

# MCP endpoint on your installation
http://127.0.0.1:4310/mcp

The shared tool surface follows catalog_search → catalog_get → quote → call → job_get. Generation uses the same account and execution rules as the REST API. Provider credentials stay on the server.

The browser playground asks for your gateway token explicitly. It holds that token only in the current tab’s memory and never embeds an operator token into the page.

Evidence before a score.

Catalog status, execution availability and observed health are separate. “Documented” means that the provider publishes the offering; it does not mean this installation has live-tested it.

  • Unobserved routes show unknown, never an invented speed or success score.
  • Provider-attempt success and final job success are different metrics.
  • Technical failures, policy rejections and unresolved jobs need separate denominators.
  • Comparable samples use matching model, operation, resolution and duration, with a visible origin and window.
  • Published prices include a source and check date. Reference inputs and other charges may require a separate quote.

Delivered output provenance will be verified separately from catalog claims. Until verification is implemented, the output status remains unverified.

Your keys. Your infrastructure.

OpenGen is an independent Apache-2.0 implementation. The gateway, catalog, application and deployment instructions belong to the public project; no proprietary control plane is required.

The first runtime uses PostgreSQL for durable jobs and accounting. Configure provider credentials on the server. Alibaba regional credentials must match the selected workspace and endpoint. Keep API tokens and provider secrets out of source control.

Deploy the website behind the same trusted access boundary as your gateway when running a private installation. Read the root README and deployment files before exposing a service publicly.

Build status

This is the first implementation milestone. The catalog, regional comparison, quote interface and durable execution foundation are being built together. The catalog states which routes are documented; the quote states what the current installation can execute.

LayerRelease requirement
CatalogComplete initial model scope, separate regional deployments, source links and capability contracts
ExecutionDurable jobs, idempotency, regional pinning, bounded reservations and explicit unknown submissions
Agent interfacesREST, MCP and CLI over the same application services
Full v1 additionsOutput provenance verification, saved routing profiles, compatibility endpoints, batch quotes, signed outbound webhooks, alerts and browser submission recovery
Later optional modulesOpt-in stalled-image acceleration, rebates and referral workflows

The repository plan records the implementation milestones and acceptance gates. Catalog breadth must never be presented as verified execution coverage.