HTTP API
Overview
Enzonic Launcher has two public HTTP APIs:
| API | Base URL | Purpose |
|---|---|---|
| Modules API | https://launcher-api.enzonic.com | Module marketplace, publishing, desktop sign-in helper, modpack shares, presence, admin review |
| AI API | https://launcher-ai.enzonic.com | Enzica 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:
Authorization: Bearer <token>Three kinds of tokens are accepted:
| Token | Who uses it | How to get it | Accepted on |
|---|---|---|---|
| Clerk session token | The website (launcher.enzonic.com) | Issued by Clerk to a signed-in browser session (getToken()). Short-lived. | All authenticated endpoints |
| Clerk OAuth access token | The desktop launcher | The launcher's "Sign in to Enzonic" flow (Authorization Code with PKCE), using the desktop sign-in helper endpoints below | All authenticated endpoints |
Publisher key enzm_... | CI systems and scripts | Created 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:
{
"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.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed. |
| 400 | validation_failed | A body field, path segment or query parameter fails the contract rules (missing, unknown, too long, wrong format). The message names the field. |
| 400 | invalid_zip, invalid_manifest | The uploaded module zip, or its module.json, failed validation. The message says which rule failed. |
| 401 | unauthorized | No token, or the token is invalid or expired. |
| 403 | forbidden | The 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. |
| 404 | not_found | The resource does not exist, or is not visible to you (for example a draft module you do not own). |
| 403 | slug_reserved, module_limit | The slug is reserved for the admin, or the account already owns 50 modules. |
| 409 | slug_taken, version_exists | The slug is already taken, or the version already exists for this module. |
| 413 | payload_too_large | The upload exceeds its size limit. |
| 415 | unsupported_media_type | Wrong Content-Type (JSON bodies need application/json, uploads multipart/form-data) or wrong file type. |
| 429 | rate_limited | Too many requests in the current window. |
| 429 | quota_exceeded | The daily Enzica quota is used up. |
| 500 | internal_error | An unexpected server error. |
| 502 | upstream_error | A 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:
| Category | Limit | Applies to |
|---|---|---|
| Auth | 30 requests per minute | /v1/auth/* |
| Writes | 60 requests per minute | POST, PATCH and DELETE requests other than uploads |
| Uploads | 10 per hour | POST /v1/modules/:slug/versions, POST /v1/shares |
| AI | 30 requests per minute, plus 200 requests per day | POST /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.comhttps://enzonic.comhttp://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
{
"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"
}| Field | Type | Description |
|---|---|---|
id | string | Internal id. |
slug | string | Unique identifier, 2 to 48 characters of a-z, 0-9 and -. Equals the id in every version's module.json. Cannot change. |
name, summary, description | string | Listing text. description is "" when none was given. |
icon_url, source_url, homepage_url | string | null | Optional URLs: icon_url is HTTPS, the others HTTP or HTTPS. |
categories | string[] | 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. |
official | boolean | true for first-party Enzonic modules. |
downloads | integer | Total downloads of all versions. |
latest_version | string | null | Newest approved version, or null before the first approval. |
owner | object | Publisher: id, name, avatar_url, live (active within the last 120 seconds) and last_seen. |
created_at, updated_at | string | Timestamps. |
published_at | string | null | When the module was first approved. |
Version object
{
"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"
}| Field | Type | Description |
|---|---|---|
id | string | Version id (used by admin endpoints). |
version | string | SemVer from module.json. |
changelog | string | Changelog submitted with the upload. |
manifest | object | The parsed module.json from the package. |
sha256 | string | Lowercase hex SHA-256 of the zip. The launcher verifies downloads against it. |
size_bytes | integer | Zip size in bytes. |
status | "pending" | "approved" | "rejected" | Review status. |
review_note | string | null | The reviewer's note, if any. |
created_at | string | Upload time. |
reviewed_at | string | null | Review time. |
Health
Health check
GET /v1/health on both launcher-api.enzonic.com and launcher-ai.enzonic.com. Public.
Response 200:
{ "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.
curl https://launcher-api.enzonic.com/v1/health
curl https://launcher-ai.enzonic.com/v1/healthDesktop 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:
| Field | Type | Description |
|---|---|---|
issuer | string | The Clerk issuer URL. |
authorize_url | string | Where the launcher opens the browser for sign-in. |
client_id | string | The OAuth client id (public). |
scopes | string[] | Always ["openid", "profile", "email"]. |
redirect_uri | string | Always "http://127.0.0.1:53682/callback". |
curl https://launcher-api.enzonic.com/v1/auth/configExchange an authorization code
POST /v1/auth/token
Request body:
| Field | Type | Description |
|---|---|---|
code | string | The authorization code received on the loopback redirect. |
code_verifier | string | The PKCE code verifier that matches the code_challenge sent to authorize_url. |
redirect_uri | string | Must be http://127.0.0.1:53682/callback. |
Response 200: the Clerk token response, passed through:
{
"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:
| Parameter | Default | Description |
|---|---|---|
q | none | Search text, at most 100 characters, matched against name, summary and slug. |
category | none | Only modules in this category (2 to 24 characters of a-z, 0-9 and -). |
sort | downloads | downloads (most downloaded first), new (newest first by first publication), or updated (most recently updated first). |
page | 1 | Page number, starting at 1. |
per_page | 24 | Items per page, 1 to 100. |
Response 200 (shape notation):
{
"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).
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):
Module & {
"versions": Version[]
}Errors: 404 not_found.
curl https://launcher-api.enzonic.com/v1/modules/server-statusCreate a module
POST /v1/modules Signed in or publisher key.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Must 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. |
name | string | Yes | Display name, 2 to 64 characters after trimming. |
summary | string | Yes | One-line summary shown in listings, 1 to 200 characters after trimming. |
description | string | No | Longer description shown on the module page, at most 20,000 characters. |
icon_url | string | null | No | HTTPS URL of the listing icon, at most 500 characters, without user name or password. |
source_url | string | null | No | HTTP or HTTPS URL of the source code, at most 500 characters, without user name or password. |
homepage_url | string | null | No | HTTP or HTTPS URL of a homepage or documentation, same rules as source_url. |
categories | string[] | No | Up 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.
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.
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.
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:
| Field | Description |
|---|---|
file | The module zip, at most 10 MiB. |
changelog | Optional 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
idequals the module slug. versionis a valid semantic version and has never been uploaded for this module.- The
mainfile, and theiconfile 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.
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.
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.zipMy account and keys
Get my profile
GET /v1/me Signed in.
Response 200:
{
"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:
[
Module & { "versions": Version[] }
]Errors: 401 unauthorized.
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.
[
{ "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.
{
"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:
{ "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.
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:
{
"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.
curl https://launcher-api.enzonic.com/v1/shares/k7Qm2xPaDownload 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.
curl -fL -o pack.enzpack https://launcher-api.enzonic.com/v1/shares/k7Qm2xPa/downloadDelete a share
DELETE /v1/shares/:code Owner (signed in). Response 204. Errors: 401 unauthorized, 403 forbidden, 404 not_found.
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:
| Field | Type | Required | Description |
|---|---|---|---|
status | "online" | "playing" | "idle" | Yes | Current status. |
activity | string | No | Short description, for example the instance being played. |
client | "web" | "launcher" | Yes | Which client sent the heartbeat. |
Response 204. Errors: 400 invalid_request, 401 unauthorized, 429 rate_limited.
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:
{
"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).
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:
{ "items": [ { "module": Module, "version": Version } ] }List files in a version
GET /v1/admin/versions/:id/files returns every file in the package:
{ "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:
{ "path": "main.js", "size": 14120, "text": "// Server Status ..." }Text files over 512 KiB return 413 file_too_large. Binary files are reported without content:
{ "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:
| Field | Type | Required | Description |
|---|---|---|---|
messages | object[] | Yes | OpenAI-style messages with role (system, user, assistant, tool), content, and tool_calls / tool_call_id where applicable. |
tools | object[] | No | OpenAI function tool definitions: { "type": "function", "function": { "name", "description", "parameters" } }. |
temperature | number | No | Sampling temperature, 0 to 2. |
stream | boolean | No | true for Server-Sent Events streaming. Default false. |
{
"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.
{
"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.
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.
{ "day": "2026-10-11", "requests": 17, "limit": 200, "input_tokens": 48211, "output_tokens": 6120 }Errors: 401 unauthorized, 403 forbidden (publisher key).
curl --fail-with-body https://launcher-ai.enzonic.com/v1/quota \
-H "Authorization: Bearer $ENZONIC_TOKEN"