Two Streamable HTTP MCP endpoints
OpenGen provides two stateless Streamable HTTP MCP endpoints (POST only; GET returns 405 with Allow: POST, OPTIONS):
| Endpoint | Tools | Authentication | RFC 9728 Protected Resource Metadata |
|---|---|---|---|
https://opengen.dev/mcp | 15 tools (9 read-only + 6 write/billable) | OAuth 2.1 DCR + PKCE or OpenGen Bearer token (read, generate) | https://opengen.dev/.well-known/oauth-protected-resource/mcp |
https://opengen.dev/mcp/readonly | 9 read-only tools (4 zero-auth public + 5 workspace-read) | Zero auth for initialize, tools/list, resources/*, prompts/*, find_models, get_model, estimate_cost, search_docs; read OAuth/Bearer token required for workspace tools | https://opengen.dev/.well-known/oauth-protected-resource/mcp/readonly |
Edge ergonomics: CORS, Accept, and SSE progress
- **Zero-friction
Accepthandling**: MissingAccept,*/*, orapplication/jsonheaders are normalized cleanly so plaincurland browserfetchJSON-RPC calls receive200 OKwithapplication/json(never spurious406 Not Acceptable). Explicitly refusing JSON (such asAccept: application/json;q=0, text/event-stream) returns406. - Opt-in SSE progress: Sending
Accept: application/json, text/event-streamtogether with_meta.progressTokenongenerate(withwaitMs > 0) orjob_get(withwaitMs > 0orafterRevision) streams livenotifications/progressframes overtext/event-stream(Cache-Control: private, no-store, no-transform,X-Accel-Buffering: no). - Browser & remote CORS: Both
/mcpand/mcp/readonlyreturnAccess-Control-Allow-Origin: *(neverAccess-Control-Allow-Credentials: true),Cache-Control: no-store,Vary: Authorization, and204OPTIONSpreflight responses.
Zero-auth test against /mcp/readonly
Any agent, IDE, or HTTP client can inspect OpenGen's catalog, schemas, regional privacy disclosures, published pricing, and docs over /mcp/readonly with zero credentials:
# 1. List all 9 read-only MCP tools with zero auth and plain default Accept
curl --fail-with-body -X POST "https://opengen.dev/mcp/readonly" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
# 2. Run a zero-auth dry-run cost estimate over MCP
curl --fail-with-body -X POST "https://opengen.dev/mcp/readonly" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "estimate_cost",
"arguments": {
"modelId": "openai/gpt-image-2",
"operation": "text-to-image",
"input": { "prompt": "Studio portrait of a ceramic vase", "resolution": "1K", "quality": "low" }
}
}
}'Complete MCP tool reference (15 tools)
Public zero-auth discovery tools (4 — /mcp/readonly & /mcp)
| Tool | Required Auth | Key Arguments | Purpose |
|---|---|---|---|
find_models | None on /mcp/readonly | query?, listCollections?, collection?, modality?, providerId?, region?, familyId?, operation?, inputRole? | Search exact catalog variants or list/inspect the 9 curated factual collections |
get_model | None on /mcp/readonly | id, operation? | Single-call inspection of an exact model, alias, series, or route: returns generationProfiles, regional routes with privacyDisclosure, deployments, and published pricing |
estimate_cost | None on /mcp/readonly | modelId, operation, input, billing?, routeId?, routing?, maxCostMicros? | Stateless dry-run cost estimator (estimatedCostMicros, recommendedMaxCostMicros, route candidates, plus workspaceEligibility when authenticated) |
search_docs | None on /mcp/readonly | query, topic?, limit? (1–10) | Search OpenGen documentation chunks across quickstart, models, generation, pricing, assets, webhooks, recovery, analytics, privacy, and mcp-cli |
Workspace read-only tools (5 — /mcp/readonly & /mcp)
| Tool | Required Scope | Key Arguments | Purpose |
|---|---|---|---|
balance | read | {} | Read availableMicros, reservedMicros, currency, workspaceId, plus billingUrl and minTopUpUsd (5) when hosted top-ups are active |
analytics | read | since?, until?, modelId?, providerId?, deploymentId?, endpointRegion?, operation?, keyId?, status?, project? | Bounded (max 31-day) workspace usage, spend (settledMicros, heldMicros, byKey, byTag), and per-route latency/reliability cohorts |
job_get | read | id? or idempotencyKey?, plus optional waitMs (0–25000), afterRevision | Read, long-poll with live progress, recover a lost submission by idempotencyKey, refresh signed output URLs, and attach the inline MCP App preview card |
jobs_list | read | status?, modelId?, providerId?, deploymentId?, endpointRegion?, operation?, keyId?, project?, since?, until?, limit?, cursor? | List private workspace generation jobs newest-first with { data, nextCursor } pagination |
assets_list | read | state? (default ready), mediaTypePrefix?, limit? (1–100), cursor? | List private workspace-owned uploaded/imported input assets with cursor pagination |
Workspace write & billable tools (6 — /mcp only)
| Tool | Required Scope | Key Arguments | Purpose |
|---|---|---|---|
generate | generate | modelId, operation, input, idempotencyKey, billing?, routeId?, routing?, maxCostMicros?, metadata?, webhookUrl?, webhookEvents?, waitMs? (0–25000) | Submit one generation once with a persisted idempotencyKey; optionally wait up to 25s for fast results + inline MCP App preview |
job_cancel | generate | id | Cancel a queued job immediately (releasing its hold) or request upstream cancellation on a running job (refund not guaranteed until confirmed) |
upload_asset | generate | source (url | job_output | presign_prepare | presign_complete | base64), plus source-specific fields | Ingest private workspace input media and obtain a reusable assetKey (inline base64 strictly capped at 64 KiB; presigned PUT up to 100 MiB) |
upload_attachment | generate | file (download_url, file_id, mime_type?, file_name?), type (image | video | audio), idempotencyKey | Hosted-chat attachment ingestion (_meta['openai/fileParams']) via SSRF-safe public HTTPS import without passing file bytes through LLM tokens |
delete_asset | generate | key | Tombstone and delete a workspace-owned input asset key (blocks new admissions while preserving in-flight job pins) |
purge_job_outputs | generate | id | Permanently delete archived output media bytes for a terminal settled job while preserving metadata and accounting history |
MCP resources, prompts, and interactive preview apps
Both /mcp and /mcp/readonly register five MCP Resources and three guided Prompts:
- Resources:
ui://opengen/job-result(text/html;profile=mcp-app) — sandboxed interactive MCP App preview card attached togenerateandjob_getresponses, displaying first-party signed images, videos, and audio with explicit CSPresourceDomains.opengen://skill(text/markdown) — safe discovery, estimation, upload, submit, and recovery workflow instructions.opengen://llms(text/plain) — compact endpoint and discovery index.opengen://pricing(application/json) — full single-source published route pricing table from@media-router/catalog.opengen://models/{provider}/{model}(application/json) — resource template listing all 54 exact models with schemas, regional routes, privacy disclosures, and pricing.- Prompts:
generate-image,image-to-video, andtroubleshoot-job.
Supported clients and verification status
Client-specific setup guides live under Agent Clients. OpenGen distinguishes live-verified integrations from documentation-only configurations:
- Live generation verified (
openai/gpt-image-21Klow+ first-party/mediadelivery, reviewed2026-11-30): ChatGPT (web), Claude (web), Grok Bot (web), Codex (codex-cli 0.155.1), and OpenGen CLI (@opengen-dev/clion npm). - Live OAuth connection verified (tool/generation turns separately pending): Claude Code, Hermes Agent, and Muse Code.
- Documentation-based (unverified end-to-end): Cursor, OpenClaw, OpenCode, and pi.
Desktop and mobile apps for hosted assistants remain separately unverified. For raw HTTP integrations outside MCP, see Quickstart and API Reference.