Skip to main content

API reference

A REST API for creating projects and running builds. Every request is scoped to your account, and streaming uses Server-Sent Events.

Base URL

text
https://api.pingless.org

Authentication

There are two ways to authenticate, depending on where the request comes from.

Browser: session cookie

On login or signup, Minely sets an httpOnly session cookie. The web app sends it automatically, so there is nothing to configure and no signing required.

Programmatic: API key

Every account gets a personal API key (forge_sk_...) at signup. It is shown once (store it securely), and you can manage keys under Settings. Send it as a bearer token:

http
Authorization: Bearer forge_sk_...

API-key requests must also be signed (see below).

Signed requests

Every API-key call must include three extra headers in addition to Authorization:

  • X-Forge-Timestamp: unix milliseconds, within ±5 minutes of server time.
  • X-Forge-Nonce: a unique random string, usable exactly once. Replays are rejected.
  • X-Forge-Signature: hex HMAC-SHA256(apiKey, canonicalString).

The canonical string is built by joining these five parts with newlines:

text
canonicalString = METHOD
PATH
TIMESTAMP
NONCE
sha256(rawBody)

Copy-pasteable Node.js signer:

javascript
import crypto from "node:crypto";

function signedHeaders(apiKey, method, path, body = "") {
  const ts = Date.now(), nonce = crypto.randomUUID();
  const bodyHash = crypto.createHash("sha256").update(body).digest("hex");
  const canonical = [method.toUpperCase(), path, ts, nonce, bodyHash].join("\n");
  const sig = crypto.createHmac("sha256", apiKey).update(canonical).digest("hex");
  return {
    Authorization: `Bearer ${apiKey}`,
    "X-Forge-Timestamp": String(ts),
    "X-Forge-Nonce": nonce,
    "X-Forge-Signature": sig,
  };
}

curl example

Create a project with signed headers (compute $SIG with the signer above):

bash
TS=$(node -e 'console.log(Date.now())')
NONCE=$(node -e 'console.log(crypto.randomUUID())')
# compute X-Forge-Signature = hex HMAC-SHA256(apiKey, canonicalString)
# canonicalString = METHOD\nPATH\nTIMESTAMP\nNONCE\nsha256(rawBody)

curl https://api.pingless.org/api/projects \
  -H "Authorization: Bearer forge_sk_..." \
  -H "X-Forge-Timestamp: $TS" \
  -H "X-Forge-Nonce: $NONCE" \
  -H "X-Forge-Signature: $SIG" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-plugin","mcVersion":"1.21.8","prompt":"a /kit command"}'

Webhooks

Register an https endpoint with POST /api/webhooks and every finished build posts a signed generation.completed event to it, with no polling needed. Verify the signature with the secret shown once at creation:

javascript
// Verify an inbound webhook (Express/Node):
const sig = req.headers["x-minely-signature"];           // "sha256=<hex>"
const expected = "sha256=" + crypto
  .createHmac("sha256", process.env.PINGLESS_WEBHOOK_SECRET)  // whsec_... from POST /api/webhooks
  .update(req.rawBody)                                        // the RAW body, not re-serialized
  .digest("hex");
if (sig !== expected) return res.sendStatus(401);
// Event: { id, type: "generation.completed", createdAt,
//   data: { generationId, projectId, status, version, costCredits, failureReason, summary } }

Errors

401signature_invalid

The X-Forge-Signature did not match the canonical string.

401replay_detected

The nonce was already used, or the timestamp is outside the ±5 minute window.

401invalid_api_key

The API key is unknown, revoked, or malformed.

429rate_limited

You exceeded a rate limit. Check the x-ratelimit-* response headers.

Rate limits

Generally 300 requests/min per identity. Auth endpoints are tighter, for example signup is 10/hr and login is 30 per 5 minutes. Every response includes x-ratelimit-* headers so you can see your remaining budget and reset time.

POST/api/projects

Create a project. Body: { name, mcVersion?, prompt? }. Returns the new project.

GET/api/projects

List the caller's projects.

POST/api/projects/:id/generate

Start a build. Body: { prompt, tier?, planOnly?, plan?, swarm?, goal? }. Returns { generationId }.

GET/api/generations/:id/stream

Server-Sent Events for a generation: phase, thought, file, log, attempt, diagnostics, build, done. Reconnect with Last-Event-ID.

POST/api/projects/:id/chat

Conversational turn with optional visual image attachments. Body: { message, attachments?, history? }. Returns a reply and, when the user asks to build, a normalized spec.

POST/api/diagnose

Log doctor. Body: { log } (a Minecraft server log excerpt). Returns a plain-English diagnosis { summary, cause, fix, fixPrompt, kind }. Billed like a chat question.

GET/api/chatbots

List the caller's Discord chatbots. POST /api/chatbots creates one (max 3 per user): { name }.

POST/api/chatbots/:id/token

Store the Discord bot token (encrypted at rest, never returned). PATCH /api/chatbots/:id updates name/guildId/channelId/systemPrompt.

POST/api/chatbots/:id/knowledge

Add a knowledge file { filename, content } (txt/md, 256 KB max, 25 files). DELETE /api/chatbots/:id/knowledge/:kid removes one.

POST/api/chatbots/:id/start

Start the bot: charges 300 credits for 30 days up front (auto-refunded if the token/intents fail). POST /api/chatbots/:id/stop stops it and clears billing.

POST/api/teams

Create a team (Pro/Team plan): { name, description? }. GET /api/teams lists my teams and pending invites. POST /api/teams/:id/invite { email } invites any user.

POST/api/teams/:id/projects

Grant the team access to one of your projects: { projectId }. DELETE /api/teams/:id/projects/:projectId revokes it.

POST/api/generations/:id/cancel

Cancel an in-flight generation. 204 on success.

POST/api/projects/:id/rebuild

Recompile the current files with no model call.

GET/api/builds/:id/jar

Get a link to the compiled jar. Returns { url }; the URL streams the jar.

GET/api/projects/:id/zip

Get a link to the project source. Returns { url }; the URL streams a zip.

GET/api/projects/:id/banner

Redirects to a short-lived signed URL for the project's generated wide key-art banner.

GET/api/billing/generations

Paginated build and credit history. Query: ?limit=&cursor=.

GET/api/billing/balance

Current credit balance.

GET/api/billing/transactions

Credit transaction history.

GET/api/keys

List your API keys (metadata only; the secret is shown once at creation).

POST/api/keys

Create a new API key. The forge_sk_ secret is returned once: store it now.

DELETE/api/keys/:id

Revoke an API key.

GET/api/projects/:id/versions

Version history: every successful build, newest first, with its version stamp (1.0.0 → 1.0.1 → …), generationId and buildId.

POST/api/projects/:id/restore

Restore a project to a past version. Body: { generationId } (from /versions). Replaces the project's files with that build's snapshot.

GET/api/usage

Your API usage: request counts per day (30d), top endpoints, recent calls, and the 30-day total.

GET/api/webhooks

List your webhook endpoints (secrets masked).

POST/api/webhooks

Register a webhook URL. Body: { url } (https). Returns the signing secret ONCE. Max 10 endpoints.

DELETE/api/webhooks/:id

Delete a webhook endpoint.

SSE event types: phase, thought, file, log, attempt, diagnostics, build, done.