HTTP API

Overview

Enzonic Launcher has two public HTTP APIs:

APIBase URLPurpose
Modules APIhttps://launcher-api.enzonic.comModule marketplace, publishing, desktop sign-in helper, modpack shares, presence, admin review
AI APIhttps://launcher-ai.enzonic.comEnzica chat proxy and quota

All endpoints are versioned under /v1. Request and response bodies are JSON (Content-Type: application/json) unless an endpoint states otherwise (file uploads use multipart/form-data, downloads return bytes). Timestamps are ISO 8601 strings in UTC.

This page documents API version 1. Most developers only need the publishing endpoints: create a module, upload versions, and check their status. The module runtime inside the launcher is documented separately in the module guide and reference.

Authentication

Send a token in the Authorization header:

text
Authorization: Bearer <token>

Three kinds of tokens are accepted:

TokenWho uses itHow to get itAccepted on
Clerk session tokenThe website (launcher.enzonic.com)Issued by Clerk to a signed-in browser session (getToken()). Short-lived.All authenticated endpoints
Clerk OAuth access tokenThe desktop launcherThe launcher's "Sign in to Enzonic" flow (Authorization Code with PKCE), using the desktop sign-in helper endpoints belowAll authenticated endpoints
Publisher key enzm_...CI systems and scriptsCreated on https://launcher.enzonic.com/publish. enzm_ followed by 32 letters and digits. Shown once.Module create, update, delete, version upload, GET /v1/me/modules, and the public module read endpoints (where it authenticates you as the owner)

Publisher keys are deliberately limited to module publishing. They cannot manage other keys, upload modpack shares, send presence heartbeats, call admin endpoints, or use the AI API. Treat a publisher key like a password: store it in a secret manager or CI secret, never in a repository. If a key leaks, delete it with DELETE /v1/me/keys/:id (or on the publish page) and create a new one. The server stores only a SHA-256 hash of each key.

Admin is the Enzonic account whose verified primary email is admin@enzonic.com. Admin rights are checked on the server for every admin endpoint.

Endpoints marked Public need no token. Endpoints marked Signed in accept a Clerk session token or a Clerk OAuth access token. Owner means a signed-in user (or that user's publisher key, where accepted) who owns the module or share.

Errors

Every error response has an HTTP status code and this body:

json
{
  "error": {
    "code": "not_found",
    "message": "Module 'server-status' does not exist."
  }
}

code is a stable, machine-readable snake_case string; message is a human-readable explanation that names the offending field or rule where relevant. Clients should branch on the HTTP status and code, and show message to people.

StatusCodeMeaning
400invalid_requestThe request is malformed.
400validation_failedA body field, path segment or query parameter fails the contract rules (missing, unknown, too long, wrong format). The message names the field.
400invalid_zip, invalid_manifestThe uploaded module zip, or its module.json, failed validation. The message says which rule failed.
401unauthorizedNo token, or the token is invalid or expired.
403forbiddenThe token is valid but not allowed to do this: you are not the owner, not the admin, or you used a publisher key on an endpoint that does not accept one.
404not_foundThe resource does not exist, or is not visible to you (for example a draft module you do not own).
403slug_reserved, module_limitThe slug is reserved for the admin, or the account already owns 50 modules.
409slug_taken, version_existsThe slug is already taken, or the version already exists for this module.
413payload_too_largeThe upload exceeds its size limit.
415unsupported_media_typeWrong Content-Type (JSON bodies need application/json, uploads multipart/form-data) or wrong file type.
429rate_limitedToo many requests in the current window.
429quota_exceededThe daily Enzica quota is used up.
500internal_errorAn unexpected server error.
502upstream_errorA service the API depends on (Clerk, the AI model provider) failed.

Rate limits

Limits are counted per user when authenticated and per IP address otherwise, in fixed windows:

CategoryLimitApplies to
Auth30 requests per minute/v1/auth/*
Writes60 requests per minutePOST, PATCH and DELETE requests other than uploads
Uploads10 per hourPOST /v1/modules/:slug/versions, POST /v1/shares
AI30 requests per minute, plus 200 requests per dayPOST /v1/chat

When a limit is hit, the API returns 429 with code rate_limited (or quota_exceeded for the daily AI quota). Wait for the current window to end before retrying: one minute for per-minute limits, one hour for uploads, and the next UTC day for the AI daily quota.

CORS

Browser requests are allowed only from these origins:

  • https://launcher.enzonic.com
  • https://enzonic.com
  • http://localhost:5173 (local website development)

Requests from other origins are rejected by the browser's CORS check. Native clients (the desktop launcher, curl, CI) send no Origin header and are not affected.

Objects

Module object

json
{
  "id": "3f1c2a9e-6d0b-4c8e-9a51-2b7f0e4d8c11",
  "slug": "server-status",
  "name": "Server Status",
  "summary": "Check whether your favorite Minecraft servers are online.",
  "description": "Keeps a list of server addresses and shows whether each one is online, its player count, version and message of the day.",
  "icon_url": "https://example.github.io/server-status/icon.png",
  "source_url": "https://github.com/example/server-status",
  "homepage_url": null,
  "categories": ["utility"],
  "status": "approved",
  "official": false,
  "downloads": 1284,
  "latest_version": "1.2.0",
  "owner": {
    "id": "user_2abcDEF123",
    "name": "Alex Rivera",
    "avatar_url": "https://img.clerk.com/avatar.png",
    "live": true,
    "last_seen": "2026-10-11T14:02:51.000Z"
  },
  "created_at": "2026-09-02T10:00:00.000Z",
  "updated_at": "2026-10-08T16:30:00.000Z",
  "published_at": "2026-09-04T09:12:00.000Z"
}
FieldTypeDescription
idstringInternal id.
slugstringUnique identifier, 2 to 48 characters of a-z, 0-9 and -. Equals the id in every version's module.json. Cannot change.
name, summary, descriptionstringListing text. description is "" when none was given.
icon_url, source_url, homepage_urlstring | nullOptional URLs: icon_url is HTTPS, the others HTTP or HTTPS.
categoriesstring[]Marketplace categories (up to 5).
status"draft" | "pending" | "approved" | "rejected" | "unlisted"Derived from the versions: approved if any version is approved, else pending if any is pending, else rejected if any exists, else draft. unlisted is set by the admin and hides the module from everyone except the owner and the admin.
officialbooleantrue for first-party Enzonic modules.
downloadsintegerTotal downloads of all versions.
latest_versionstring | nullNewest approved version, or null before the first approval.
ownerobjectPublisher: id, name, avatar_url, live (active within the last 120 seconds) and last_seen.
created_at, updated_atstringTimestamps.
published_atstring | nullWhen the module was first approved.

Version object

json
{
  "id": "8b2d4f60-1e7a-4c3b-b9d2-5a0c6e1f7d33",
  "version": "1.2.0",
  "changelog": "Shows the message of the day. Fixes the player count for offline servers.",
  "manifest": {
    "id": "server-status",
    "name": "Server Status",
    "version": "1.2.0",
    "description": "Save a list of Minecraft server addresses and check whether each one is online.",
    "author": "Alex Rivera",
    "main": "main.js",
    "minLauncher": "1.0.0",
    "permissions": ["http:api.mcsrvstat.us", "storage", "notifications"]
  },
  "sha256": "9f2c0a4e7b1d3c5f6a8e0b2d4c6f8a1e3b5d7f9c0e2a4b6d8f1a3c5e7b9d0f2a",
  "size_bytes": 14873,
  "status": "approved",
  "review_note": null,
  "created_at": "2026-10-07T18:00:00.000Z",
  "reviewed_at": "2026-10-08T16:30:00.000Z"
}
FieldTypeDescription
idstringVersion id (used by admin endpoints).
versionstringSemVer from module.json.
changelogstringChangelog submitted with the upload.
manifestobjectThe parsed module.json from the package.
sha256stringLowercase hex SHA-256 of the zip. The launcher verifies downloads against it.
size_bytesintegerZip size in bytes.
status"pending" | "approved" | "rejected"Review status.
review_notestring | nullThe reviewer's note, if any.
created_atstringUpload time.
reviewed_atstring | nullReview time.

Health

Health check

GET /v1/health on both launcher-api.enzonic.com and launcher-ai.enzonic.com. Public.

Response 200:

json
{ "ok": true, "service": "launcher-api", "version": "1.0.0" }

service identifies which API answered (launcher-api or launcher-ai); version is the deployed API version.

bash
curl https://launcher-api.enzonic.com/v1/health
curl https://launcher-ai.enzonic.com/v1/health

Desktop sign-in helper

The desktop launcher signs users in to Enzonic with OAuth 2.0 Authorization Code and PKCE. Because the OAuth client secret must never ship inside the desktop app, the token exchange goes through these endpoints, which hold the secret on the server. They are used by the launcher; most developers never call them. All are Public (they carry their own credentials in the body) and count toward the Auth rate limit.

Get OAuth configuration

GET /v1/auth/config

Response 200:

FieldTypeDescription
issuerstringThe Clerk issuer URL.
authorize_urlstringWhere the launcher opens the browser for sign-in.
client_idstringThe OAuth client id (public).
scopesstring[]Always ["openid", "profile", "email"].
redirect_uristringAlways "http://127.0.0.1:53682/callback".
bash
curl https://launcher-api.enzonic.com/v1/auth/config

Exchange an authorization code

POST /v1/auth/token

Request body:

FieldTypeDescription
codestringThe authorization code received on the loopback redirect.
code_verifierstringThe PKCE code verifier that matches the code_challenge sent to authorize_url.
redirect_uristringMust be http://127.0.0.1:53682/callback.

Response 200: the Clerk token response, passed through:

json
{
  "access_token": "eyJhbGciOi...",
  "refresh_token": "rt_7d1f...",
  "expires_in": 3600,
  "token_type": "Bearer",
  "id_token": "eyJhbGciOi..."
}

id_token is present when Clerk returns one. Errors: 400 invalid_request (missing fields, wrong redirect_uri, or the code or verifier was rejected), 429 rate_limited, 502 upstream_error.

Refresh an access token

POST /v1/auth/refresh

Request body: { "refresh_token": "rt_7d1f..." }. Response 200: same shape as the token exchange. Errors: 400 invalid_request (missing or rejected refresh token), 429 rate_limited, 502 upstream_error.

Revoke a token

POST /v1/auth/revoke

Request body: { "token": "<access or refresh token>" }. Response 204 with no body. Errors: 400 invalid_request, 429 rate_limited, 502 upstream_error.

Modules

List modules

GET /v1/modules Public. Returns approved modules only.

Query parameters:

ParameterDefaultDescription
qnoneSearch text, at most 100 characters, matched against name, summary and slug.
categorynoneOnly modules in this category (2 to 24 characters of a-z, 0-9 and -).
sortdownloadsdownloads (most downloaded first), new (newest first by first publication), or updated (most recently updated first).
page1Page number, starting at 1.
per_page24Items per page, 1 to 100.

Response 200 (shape notation):

text
{
  "items": Module[],
  "total": 57,
  "page": 1,
  "per_page": 24
}

Module is the Module object described above. Errors: 400 invalid_request (bad sort, page or per_page).

bash
curl "https://launcher-api.enzonic.com/v1/modules?q=server&sort=downloads&page=1&per_page=24"

Get a module

GET /v1/modules/:slug Public. Approved modules are visible to everyone. The owner and the admin also see draft, pending and rejected modules, and all versions with every status. Others see only approved versions.

Response 200: a Module object with an extra versions array of Version objects, newest first (shape notation; see Objects):

text
Module & {
  "versions": Version[]
}

Errors: 404 not_found.

bash
curl https://launcher-api.enzonic.com/v1/modules/server-status

Create a module

POST /v1/modules Signed in or publisher key.

Request body:

FieldTypeRequiredDescription
slugstringYesMust match ^[a-z0-9][a-z0-9-]{1,47}$ (2 to 48 characters). Must equal the id in your module.json. Cannot be changed later. enzonic, enzonic-*, admin, api, official, new, publish and settings are reserved for the admin.
namestringYesDisplay name, 2 to 64 characters after trimming.
summarystringYesOne-line summary shown in listings, 1 to 200 characters after trimming.
descriptionstringNoLonger description shown on the module page, at most 20,000 characters.
icon_urlstring | nullNoHTTPS URL of the listing icon, at most 500 characters, without user name or password.
source_urlstring | nullNoHTTP or HTTPS URL of the source code, at most 500 characters, without user name or password.
homepage_urlstring | nullNoHTTP or HTTPS URL of a homepage or documentation, same rules as source_url.
categoriesstring[]NoUp to 5 unique marketplace categories, each 2 to 24 characters of a-z, 0-9 and -, starting with a letter or digit.

Unknown fields are rejected. Each account can own at most 50 modules.

Response 201: the new Module object with status: "draft". Drafts are visible only to the owner and the admin.

Errors: 400 validation_failed, 401 unauthorized, 403 slug_reserved, 403 module_limit, 409 slug_taken, 429 rate_limited.

bash
curl --fail-with-body -X POST https://launcher-api.enzonic.com/v1/modules \
  -H "Authorization: Bearer $ENZONIC_PUBLISHER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "server-status",
    "name": "Server Status",
    "summary": "Check whether your favorite Minecraft servers are online.",
    "description": "Keeps a list of server addresses and shows whether each one is online.",
    "source_url": "https://github.com/example/server-status"
  }'

Update a module

PATCH /v1/modules/:slug Owner (signed in or publisher key).

Request body: any subset of name, summary, description, icon_url, source_url, homepage_url, categories, with the same rules as when creating; at least one field is required and unknown fields are rejected. slug cannot be changed. Send null for icon_url, source_url or homepage_url to clear it. The admin may also set official.

Response 200: the updated Module object.

Errors: 400 validation_failed, 401 unauthorized, 403 forbidden, 404 not_found, 429 rate_limited.

bash
curl --fail-with-body -X PATCH https://launcher-api.enzonic.com/v1/modules/server-status \
  -H "Authorization: Bearer $ENZONIC_PUBLISHER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "summary": "Live status, players and MOTD for your favorite servers." }'

Delete a module

DELETE /v1/modules/:slug Owner or admin.

Deletes the module, all its versions and their stored packages. Users who installed it keep their installed copy but receive no updates. This cannot be undone, and the slug becomes available again.

Response 204 with no body. Errors: 401 unauthorized, 403 forbidden, 404 not_found, 429 rate_limited.

bash
curl --fail-with-body -X DELETE https://launcher-api.enzonic.com/v1/modules/server-status \
  -H "Authorization: Bearer $ENZONIC_PUBLISHER_KEY"

Versions

Upload a version

POST /v1/modules/:slug/versions Owner (signed in or publisher key). Counts toward the Uploads rate limit.

Request: multipart/form-data with two fields:

FieldDescription
fileThe module zip, at most 10 MiB.
changelogOptional plain-text description of the changes in this version, at most 10,000 characters.

The server validates the package before accepting it:

  • module.json (at most 64 KiB) is present at the zip root and valid according to the module manifest schema (required fields, formats, known permissions, no unknown fields).
  • The manifest id equals the module slug.
  • version is a valid semantic version and has never been uploaded for this module.
  • The main file, and the icon file if given, exist in the zip.
  • No absolute paths, drive letters, .. or . segments, empty segments, backslashes or control characters; paths at most 255 characters; no two paths that differ only in letter case.
  • Stored or deflate entries only, at most 500 entries and at most 25 MiB uncompressed.

Response 201: the new Version object with status: "pending". If the module was draft or rejected, its status becomes pending too. The version becomes available to users after an admin approves it.

Errors: 400 file_required, 400 invalid_zip, 400 invalid_manifest, 400 validation_failed (changelog too long), 401 unauthorized, 403 forbidden, 404 not_found, 409 version_exists, 413 payload_too_large, 415 unsupported_media_type, 429 rate_limited.

bash
curl --fail-with-body -X POST https://launcher-api.enzonic.com/v1/modules/server-status/versions \
  -H "Authorization: Bearer $ENZONIC_PUBLISHER_KEY" \
  -F "file=@server-status-1.2.0.zip;type=application/zip" \
  -F "changelog=Shows the message of the day. Fixes the player count for offline servers."

Download a version

GET /v1/modules/:slug/versions/:version/download Public for approved versions. The owner and the admin may download any version.

Response 200: the zip bytes with Content-Type: application/zip and the header X-Content-SHA256 containing the lowercase hex SHA-256 of the body. Each successful download increments the module's download count. Clients MUST verify the SHA-256 before installing.

Errors: 404 not_found.

bash
curl -fL -o server-status-1.2.0.zip -D headers.txt \
  https://launcher-api.enzonic.com/v1/modules/server-status/versions/1.2.0/download
grep -i x-content-sha256 headers.txt
sha256sum server-status-1.2.0.zip

My account and keys

Get my profile

GET /v1/me Signed in.

Response 200:

json
{
  "user_id": "user_2abcDEF123",
  "email": "alex@example.com",
  "name": "Alex Rivera",
  "avatar_url": "https://img.clerk.com/avatar.png",
  "is_admin": false
}

Errors: 401 unauthorized, 403 forbidden (publisher key).

List my modules

GET /v1/me/modules Signed in or publisher key.

Response 200: an array of your Module objects in every status, each with a versions array of all its versions in every status, newest first:

text
[
  Module & { "versions": Version[] }
]

Errors: 401 unauthorized.

bash
curl --fail-with-body https://launcher-api.enzonic.com/v1/me/modules \
  -H "Authorization: Bearer $ENZONIC_PUBLISHER_KEY"

List my publisher keys

GET /v1/me/keys Signed in (publisher keys are not accepted).

Response 200: metadata for each of your keys. The key itself is never returned again after creation.

json
[
  { "id": "6c0e9b1a-2f4d-4e8a-a7c3-9d5b1e0f2a44", "name": "GitHub Actions", "created_at": "2026-09-02T10:05:00.000Z", "last_used_at": "2026-10-07T18:00:00.000Z" }
]

Errors: 401 unauthorized, 403 forbidden.

Create a publisher key

POST /v1/me/keys Signed in (publisher keys are not accepted).

Request body: { "name": "GitHub Actions" } (a label to recognize the key, 1 to 64 characters after trimming). Each account can have at most 10 active keys (403 key_limit).

Response 201: the key and its metadata. The key value is shown only in this response; store it immediately.

json
{
  "key": "enzm_4Fh9kQ2mZx7LpV0sTb3NcWy8RdJe1GaU",
  "id": "6c0e9b1a-2f4d-4e8a-a7c3-9d5b1e0f2a44",
  "name": "GitHub Actions",
  "created_at": "2026-09-02T10:05:00.000Z"
}

Errors: 400 validation_failed, 401 unauthorized, 403 forbidden, 403 key_limit, 429 rate_limited.

Most people create keys on https://launcher.enzonic.com/publish, which calls this endpoint with the browser session.

Delete a publisher key

DELETE /v1/me/keys/:id Signed in (publisher keys are not accepted).

Response 204. The key stops working immediately. Errors: 401 unauthorized, 403 forbidden, 404 not_found.

Modpack shares

Share codes let launcher users share a modpack (an .enzpack or an .mrpack) with a short link.

Create a share

POST /v1/shares Signed in. Counts toward the Uploads rate limit.

Request: multipart/form-data with file (an .enzpack or .mrpack file, at most 50 MiB) and an optional title (text shown on the share page, 1 to 100 characters, defaults to the pack name). Each account can keep at most 200 shares. The server checks the file before storing it: for an .enzpack the header, size limits, the SHA-256 checksum and every path in its file list; for an .mrpack its modrinth.index.json and entry paths.

Response 201:

json
{ "code": "k7Qm2xPa", "url": "https://launcher.enzonic.com/s/k7Qm2xPa", "format": "enzpack" }

Errors: 400 invalid_enzpack or 400 invalid_mrpack (the file failed the checks; the message says why), 400 file_required, 401 unauthorized, 413 payload_too_large, 415 unsupported_media_type (another file extension), 429 rate_limited.

bash
curl --fail-with-body -X POST https://launcher-api.enzonic.com/v1/shares \
  -H "Authorization: Bearer $ENZONIC_TOKEN" \
  -F "file=@my-pack.mrpack" \
  -F "title=Friends survival pack"

ENZONIC_TOKEN is a Clerk session or OAuth access token; publisher keys are not accepted here.

Get a share

GET /v1/shares/:code Public.

Response 200:

json
{
  "code": "k7Qm2xPa",
  "title": "Friends survival pack",
  "kind": "modpack",
  "format": "enzpack",
  "size_bytes": 48211,
  "sha256": "c4a1e9037b5d2f8e6a0c3b7d9e1f4a2c8b6d0e3f5a7c9b1d2e4f6a8c0b3d5e7f",
  "downloads": 12,
  "created_at": "2026-10-09T20:15:00.000Z",
  "owner": { "name": "Alex Rivera" }
}

Errors: 404 not_found.

bash
curl https://launcher-api.enzonic.com/v1/shares/k7Qm2xPa

Download a share

GET /v1/shares/:code/download Public. Returns the file bytes (.enzpack or .mrpack, as format says) and increments the share's download count. Verify the bytes against sha256 from the share metadata.

Errors: 404 not_found.

bash
curl -fL -o pack.enzpack https://launcher-api.enzonic.com/v1/shares/k7Qm2xPa/download

Delete a share

DELETE /v1/shares/:code Owner (signed in). Response 204. Errors: 401 unauthorized, 403 forbidden, 404 not_found.

bash
curl --fail-with-body -X DELETE https://launcher-api.enzonic.com/v1/shares/k7Qm2xPa \
  -H "Authorization: Bearer $ENZONIC_TOKEN"

Presence

Presence powers the "Live" badge next to publishers and users. A user is live when their last heartbeat was less than 120 seconds ago.

Send a heartbeat

POST /v1/presence/heartbeat Signed in. The website and the launcher send one every 60 seconds while open.

Request body:

FieldTypeRequiredDescription
status"online" | "playing" | "idle"YesCurrent status.
activitystringNoShort description, for example the instance being played.
client"web" | "launcher"YesWhich client sent the heartbeat.

Response 204. Errors: 400 invalid_request, 401 unauthorized, 429 rate_limited.

bash
curl --fail-with-body -X POST https://launcher-api.enzonic.com/v1/presence/heartbeat \
  -H "Authorization: Bearer $ENZONIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "status": "online", "client": "web" }'

Get presence

GET /v1/presence?ids=user_a,user_b Public. ids is a comma-separated list of up to 100 user ids.

Response 200: an object keyed by user id:

json
{
  "user_2abcDEF123": { "live": true, "status": "playing", "activity": "Survival 1.21", "last_seen": "2026-10-11T14:02:51.000Z" },
  "user_2xyzUVW456": { "live": false, "status": "idle", "activity": null, "last_seen": "2026-10-10T08:41:10.000Z" }
}

Errors: 400 invalid_request (missing ids or too many).

bash
curl "https://launcher-api.enzonic.com/v1/presence?ids=user_2abcDEF123,user_2xyzUVW456"

Admin

These endpoints are restricted to the Enzonic admin account and return 403 forbidden for everyone else. They are documented here for transparency, so publishers can see exactly how review works.

Review queue

GET /v1/admin/queue returns pending versions, oldest first:

text
{ "items": [ { "module": Module, "version": Version } ] }

List files in a version

GET /v1/admin/versions/:id/files returns every file in the package:

json
{ "files": [ { "path": "module.json", "size": 412 }, { "path": "main.js", "size": 14120 } ] }

Read a file in a version

GET /v1/admin/versions/:id/file?path=main.js returns the file for reading in the review tool. UTF-8 text files up to 512 KiB are returned as text:

json
{ "path": "main.js", "size": 14120, "text": "// Server Status ..." }

Text files over 512 KiB return 413 file_too_large. Binary files are reported without content:

json
{ "path": "icon.png", "size": 20511, "binary": true }

Approve a version

POST /v1/admin/versions/:id/approve with optional body { "note": "Looks good." } (at most 2,000 characters) returns the updated Version. The module becomes approved, its latest_version is set to this version, and published_at is set if this is its first approval.

Reject a version

POST /v1/admin/versions/:id/reject with required body { "note": "Declares instances.write but never writes files." } (1 to 2,000 characters) returns the updated Version. The note is shown to the publisher.

Unlist and relist a module

POST /v1/admin/modules/:slug/unlist removes a module from public listings and downloads; POST /v1/admin/modules/:slug/relist restores it. Both return the updated Module.

Review events

GET /v1/admin/events?module=server-status returns the audit log of review actions (approvals, rejections, unlistings) for a module.

AI API

The AI API at https://launcher-ai.enzonic.com proxies Enzica for the launcher, including modules that use enzonic.ai.chat. It speaks the OpenAI chat-completions format. The model and provider keys are chosen by the server; any client-supplied model or key fields are removed. Tools are never executed on the server: the agent loop runs in the launcher, because tools act on local files. The server always adds its own system message first: Enzica only helps with Minecraft: Java Edition, Enzonic Launcher and Enzonic services (translating Minecraft content such as mod pages is included), declines anything else in one sentence and treats tool results as untrusted data. Clients cannot remove it.

All AI endpoints except health are Signed in (Clerk session or OAuth access token). Publisher keys are not accepted.

Chat

POST /v1/chat

Request body:

FieldTypeRequiredDescription
messagesobject[]YesOpenAI-style messages with role (system, user, assistant, tool), content, and tool_calls / tool_call_id where applicable.
toolsobject[]NoOpenAI function tool definitions: { "type": "function", "function": { "name", "description", "parameters" } }.
temperaturenumberNoSampling temperature, 0 to 2.
streambooleanNotrue for Server-Sent Events streaming. Default false.
json
{
  "messages": [
    { "role": "system", "content": "You help players fix Minecraft instances." },
    { "role": "user", "content": "Which of my instances use Fabric?" }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "list_instances",
        "description": "List the user's instances.",
        "parameters": { "type": "object", "properties": {}, "required": [] }
      }
    }
  ]
}

Response 200 (non-streaming): an OpenAI-compatible chat completion.

json
{
  "id": "chatcmpl-91f3c2",
  "object": "chat.completion",
  "created": 1791734400,
  "model": "enzonic-ai",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": null,
        "tool_calls": [
          { "id": "call_1", "type": "function", "function": { "name": "list_instances", "arguments": "{}" } }
        ]
      },
      "finish_reason": "tool_calls"
    }
  ],
  "usage": { "prompt_tokens": 96, "completion_tokens": 14, "total_tokens": 110 }
}

The model value is informational and may change. With stream: true, the response is text/event-stream with OpenAI-compatible chat.completion.chunk events, each sent as a data: line, ending with data: [DONE].

Errors: 400 invalid_request, 401 unauthorized, 403 forbidden (publisher key), 429 rate_limited (30 per minute), 429 quota_exceeded (200 per day), 502 upstream_error.

bash
curl --fail-with-body -X POST https://launcher-ai.enzonic.com/v1/chat \
  -H "Authorization: Bearer $ENZONIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "messages": [ { "role": "user", "content": "Explain what a Fabric loader version is in one sentence." } ] }'

Quota

GET /v1/quota returns today's usage for the signed-in user. day is the current UTC date.

json
{ "day": "2026-10-11", "requests": 17, "limit": 200, "input_tokens": 48211, "output_tokens": 6120 }

Errors: 401 unauthorized, 403 forbidden (publisher key).

bash
curl --fail-with-body https://launcher-ai.enzonic.com/v1/quota \
  -H "Authorization: Bearer $ENZONIC_TOKEN"

Questions about the docs: admin@enzonic.com

Theme

Language

Sign-in only works on launcher.enzonic.com because Enzonic accounts are tied to the enzonic.com domain.