Interactive API reference.
Explore all 24 public endpoints for model discovery, pricing estimates, private asset uploads, generations, Ed25519 webhooks, and workspace analytics. Zero external CDN dependencies or SDK required.
AGENT PROMPT · PASTE INTO YOUR AGENT OR AUTO-READ
Fetch the live OpenGen OpenAPI 3.1 specification at https://opengen.dev/openapi.json.
1. Use public GET /v1/models, GET /v1/models/{provider}/{model}, GET /v1/routes, and GET /v1/pricing without authentication (cached with Cache-Control and CORS).
2. Before any billable POST /v1/generations call, run POST /v1/pricing/estimate, confirm the route and maxCostMicros spend cap with the user, and persist a unique Idempotency-Key header.
3. Poll compact status via GET /v1/generations/{id}/status or stream GET /v1/generations/{id}/events, and recover lost responses via GET /v1/generations/lookup.Public Developer API baselineShowing 24 public API endpoints while checking /openapi.json…
Download /openapi.json ↗24 of 24 endpoints
Method
Group
Models & Catalog
6 endpointsGET/v1/modelsList and search exact model variants (compact default; ?expand=schemas)models.list#
Auth:
Public (no auth required)Tags: modelsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/models"GET/v1/models/{provider}/{model}Inspect one exact model, its schemas, regional routes, and published pricingmodels.get#
Auth:
Public (no auth required)Tags: modelsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | string | Yes | — |
model | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/models/openai/gpt-image-2"GET/v1/models/schemaRead canonical JSON input schema and limits for a model and operationmodels.schema#
Auth:
Public (no auth required)Tags: modelsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
modelId | query | string | Yes | Exact catalog model ID (for example openai/gpt-image-2). |
operation | query | string | Yes | Generation operation supported by the model (for example text-to-image). |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -G "$OPENGEN_API_URL/v1/models/schema" \
--data-urlencode "modelId=openai/gpt-image-2" \
--data-urlencode "operation=text-to-image"GET/v1/collectionsList curated capability collections across image, video, and audiocollections.list#
Auth:
Public (no auth required)Tags: modelsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/collections"GET/v1/collections/{slug}Inspect one capability collection and its member variantscollections.get#
Auth:
Public (no auth required)Tags: modelsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/collections/fast-image"GET/v1/routesList regional serving routes with privacy and residency disclosuresroutes.list#
Auth:
Public (no auth required)Tags: modelsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/routes"Pricing & Estimates
2 endpointsGET/v1/pricingList source-linked published micro-USD tariffs per routepricing.list#
Auth:
Public (no auth required)Tags: pricingExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/pricing"POST/v1/pricing/estimateEstimate generation cost and route eligibility without reserving creditpricing.estimate#
Auth:
Public (no auth required)Tags: pricingExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/pricing/estimate" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonGenerations & Jobs
8 endpointsPOST/v1/generationsSubmit a billable generation once with an Idempotency-Keymedia.generate#
Auth:
Bearer token or sessionHeader: Idempotency-Key requiredTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | Yes | Persist this key with the exact original request before submission; reuse only for that request. |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/generations" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Idempotency-Key: $OPENGEN_IDEMPOTENCY_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonGET/v1/generationsList recent private generation jobs in the authenticated workspacejobs.list#
Auth:
Bearer token or sessionTags: generationsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/generations" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/v1/generations/lookupRecover an admitted job by its original Idempotency-Keyjobs.lookup#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
idempotencyKey | query | string | Yes | Original Idempotency-Key persisted prior to submission. |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -G "$OPENGEN_API_URL/v1/generations/lookup" \
--data-urlencode "idempotencyKey=$OPENGEN_IDEMPOTENCY_KEY" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/v1/generations/{id}Read full job details and refresh temporary private output download linksjobs.get#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/generations/$OPENGEN_JOB_ID" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/v1/generations/{id}/statusPoll or long-poll compact job status (?afterRevision, ?waitMs)jobs.status#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/generations/$OPENGEN_JOB_ID/status" \
-H "Authorization: Bearer $OPENGEN_API_KEY"POST/v1/generations/{id}/cancelRequest cancellation of an in-flight generation jobjobs.cancel#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/generations/$OPENGEN_JOB_ID/cancel" \
-H "Authorization: Bearer $OPENGEN_API_KEY"DELETE/v1/generations/{id}/outputsPermanently purge archived output media bytes for a terminal jobjobs.purgeOutputs#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X DELETE "$OPENGEN_API_URL/v1/generations/$OPENGEN_JOB_ID/outputs" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/v1/generations/{id}/eventsStream private job status updates via Server-Sent Eventsjobs.events#
Auth:
Bearer token or sessionTags: generationsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | — |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/generations/$OPENGEN_JOB_ID/events" \
-H "Authorization: Bearer $OPENGEN_API_KEY"Private Assets
4 endpointsPOST/v1/assetsUpload, import by HTTPS URL, reuse a job output, or prepare a presigned PUTassets.create#
Auth:
Bearer token or sessionTags: assetsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | No | Required when source is "url" or "job_output"; optional for direct upload or presign. |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/assets" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonPOST/v1/assets/completeFinalize a presigned single-PUT input asset uploadassets.complete#
Auth:
Bearer token or sessionTags: assetsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X POST "$OPENGEN_API_URL/v1/assets/complete" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonGET/v1/assetsList workspace-owned input assets or inspect one asset by keyassets.get#
Auth:
Bearer token or sessionTags: assetsExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/assets" \
-H "Authorization: Bearer $OPENGEN_API_KEY"DELETE/v1/assetsTombstone a workspace-owned input asset (?key= or JSON { key })assets.delete#
Auth:
Bearer token or sessionTags: assetsParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | query | string | No | Owned workspace asset key to delete. Supply via ?key=<assetKey> or JSON body { "key": "<assetKey>" }. |
Executable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body -X DELETE -G "$OPENGEN_API_URL/v1/assets" \
--data-urlencode "key=$OPENGEN_ASSET_KEY" \
-H "Authorization: Bearer $OPENGEN_API_KEY"Webhooks
1 endpointGET/.well-known/webhook-jwks.jsonRead public Ed25519 verification keys for per-request ad-hoc webhookswebhooks.jwks#
Auth:
Public (no auth required)Tags: webhooksExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/.well-known/webhook-jwks.json"Account & Health
3 endpointsGET/v1/balanceInspect available and reserved workspace credit in micro-USDbalance.get#
Auth:
Bearer token or sessionTags: accountExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/balance" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/v1/analyticsRead bounded workspace spend, usage, and latency/reliability cohortsanalytics.get#
Auth:
Bearer token or sessionTags: accountExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/v1/analytics" \
-H "Authorization: Bearer $OPENGEN_API_KEY"GET/healthCheck gateway livenesshealth#
Auth:
Public (no auth required)Tags: accountExecutable examples
export OPENGEN_API_URL="https://opengen.dev"
curl --fail-with-body "$OPENGEN_API_URL/health"