Authentication
Create a key at Account → API keys and send it as a Bearer token on every request:
Authorization: Bearer lm_live_…
A key can do everything your account can do — including spend Sparks — except manage keys or change credentials; those need a web login. Keys are shown once at creation, stored hashed, and die the moment you revoke them. At most 10 active keys.
Sparks & billing
Paid operations debit your Sparks wallet at request time and refund automatically if the work fails. Costs are stated per endpoint below; the ones to know:
Insufficient balance returns
402 with {need, have} in the detail.
Quickstart
Render your subject
curl -s https://loralume.com/api/me/subjects/SUBJECT_ID/generate \
-H "Authorization: Bearer $LORALUME_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Nora as an astronaut, golden hour", "quantity": 2}'
# => {"request_ids": [...], "sparks_debited": 8, ...}
# poll /api/me/subjects/SUBJECT_ID/room until your request_ids
# carry a generated_image_id
Turn a picture into a 3D model
curl -s https://loralume.com/api/me/images/IMAGE_ID/to-3d \
-H "Authorization: Bearer $LORALUME_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Rocket", "target_faces": 40000}'
# => {"id": "MODEL_ID", "status": "queued", ...} (40⚡)
# poll /api/me/models/MODEL_ID until status is completed,
# then download /api/me/models/MODEL_ID/file (.glb)
Fix its skin from code
# the atlas as PNG curl -s -H "Authorization: Bearer $LORALUME_KEY" \ https://loralume.com/api/me/models/MODEL_ID/texture -o atlas.png # edit it in anything, then save it back as a new version (2⚡) curl -s https://loralume.com/api/me/models/MODEL_ID/paint \ -H "Authorization: Bearer $LORALUME_KEY" -F file=@atlas.png
Conventions
{"detail": ...}; validation errors carry a detail array.completed and failed/rejected are terminal, and failures refund automatically.parent_model_id points at its source.Receiving webhooks
Instead of polling, register an endpoint and Loralume POSTs JSON to it when work finishes:
{
"event": "model.completed",
"created_at": "2026-08-24T14:03:22+00:00",
"data": {"model_id": "…", "op": "create", "status": "completed",
"faces": 40000, "has_texture": true, "sparks_debited": 40}
}
Every delivery is signed. Verify it with the secret from registration:
# X-Loralume-Signature: sha256=<hex>
import hmac, hashlib
expected = "sha256=" + hmac.new(secret.encode(), raw_body,
hashlib.sha256).hexdigest()
ok = hmac.compare_digest(request.headers["X-Loralume-Signature"], expected)
Answer with any 2xx within 10
seconds. Anything else is retried with backoff (up to 5 tries over ~2.5
hours); an endpoint that fails 50 deliveries in a row is switched off and
shows why in disabled_reason.
Generation & gallery
GET/api/me/flagsReturns the per-user feature-flag mask the client reads once at sign-in.
GET/api/me/workshopOne-call payload for the signed-in home page: subject tiles, Cast tiles, and the last 12 generations.
GET/api/me/history/ordersLegacy bundle-era order receipts for grandfathered accounts.
GET/api/me/subjects/{subject_id}/roomFull Subject Room payload: summary, in-flight order, recent generation batches, matching theme packs, and downloadable files.
POST/api/me/subjects/{subject_id}/generateQueues 1-4 portrait renders of one trained subject against its own model (wallet mode).
GET/api/me/subjects/{subject_id}/portrait-modelDownloads the subject's trained portrait model as a .safetensors attachment.
GET/api/me/compose/modelsReturns the curated model list for the compose page, with live per-image prices.
POST/api/me/composeQueues a free-form render with a chosen model and up to 4 of the user's trained subjects blended in.
GET/api/me/compose/historyLists the user's most recent compose renders with full metadata.
GET/api/me/galleryPaginated, filterable archive of every image the user has generated or uploaded.
GET/api/me/gallery/facetsCounts that drive the gallery filter bar — only models and subjects the user actually owns images for.
DELETE/api/me/gallery/{image_id}Permanently deletes one of the user's own images — the DB row, the PNG, and cached thumbnails.
POST/api/me/images/{image_id}/upscaleQueues an image operation (upscale, generative enhance, background removal, face detail, or colorize) on an image the user owns.
POST/api/me/images/{image_id}/repaintRepaints (inpaints) the brushed area of an owned image — replace it per the prompt, or just remove it.
GET/api/me/image-ops/{op_id}Reads one image operation's status — the poll target for upscale/enhance/remove_bg/face/colorize/repaint.
GET/api/me/image-opsLists the user's recent image operations, newest first.
POST/api/me/castsCreates a Cast — a named, reusable group of 2-4 trained subjects for group photos.
GET/api/me/castsLists the user's Casts as compact grid tiles, most recently updated first.
GET/api/me/casts/{cast_id}Reads one Cast in full, including its ordered member list.
PATCH/api/me/casts/{cast_id}Renames a Cast, changes its type, or replaces its member set.
DELETE/api/me/casts/{cast_id}Soft-deletes a Cast.
GET/api/me/casts/{cast_id}/roomFull Cast Room payload: the Cast, its in-flight order, recent generation batches, matching theme packs, and render defaults.
POST/api/me/casts/{cast_id}/generateQueues 1-4 group renders of a Cast, with a per-face regional refine pass for every non-primary member.
POST/api/me/compose/{image_id}/publishToggle whether one of your compose renders is shown on the public Explore page.
Sparks wallet
GET/api/me/walletReturns the signed-in user's current Sparks balance with per-bucket breakdown, subscription state, and daily-streak info.
POST/api/me/wallet/claim-dailyClaims the 20-Spark daily grant; every 7th consecutive streak day also pays a 200-Spark bonus.
GET/api/me/wallet/transactionsPaginated view of the user's Sparks ledger, newest first.
GET/api/me/wallet/packages no authLists the Sparks top-up packages available for purchase (used on the pricing page).
GET/api/me/wallet/tiers no authLists the monthly subscription tiers (used on the pricing page).
POST/api/me/wallet/purchase-intentCreates a Stripe PaymentIntent for a one-time Sparks top-up pack; the client confirms it with Stripe.js using the returned client_secret.
POST/api/me/wallet/subscribe-checkoutCreates a Stripe Checkout session for a monthly subscription tier and returns the hosted checkout URL to redirect the user to.
Training
POST/api/trainCreates a new wallet-mode LoRA training order (wizard Step 1) for a person, pet, or object subject.
GET/api/train/{order_id}/analysisReturns dataset analysis for an order's uploaded photos: counts, diversity, identity checks, and improvement suggestions (wizard Step 2).
POST/api/train/{order_id}/planPreviews the exact Sparks cost of a training submission for the chosen base models without committing or charging anything (wizard Step 3 preview).
POST/api/train/{order_id}/submitDebits Sparks and enqueues one training job per chosen base model, starting the actual training (wizard Step 3 commit).
GET/api/train/{order_id}/epochsLists every epoch checkpoint produced by each training job on the order, with sample image URLs, for choosing the best result.
GET/api/train/{order_id}/artifacts/{artifact_id}/samples/{filename}Serves a single sample image (PNG) generated from an epoch checkpoint so the customer can compare epochs visually.
POST/api/train/{order_id}/jobs/{job_id}/pick-epochSelects the winning epoch checkpoint for a training job; that checkpoint becomes the subject's usable LoRA model.
Subjects
GET/api/me/subjectsList all of the user's trained subjects, including delivered LoRA orders not yet linked to a subject (shown with pseudo-id `order-{order_id}`).
POST/api/me/subjectsCreate a new subject from a reference photo; the photo is safety-checked by the guard model before the subject is saved.
GET/api/me/subjects/{subject_id}Fetch one subject by id.
PATCH/api/me/subjects/{subject_id}Rename a subject and/or update its age bracket and family role.
DELETE/api/me/subjects/{subject_id}Soft-delete a subject; order history is preserved but the LoRA file and all photos are permanently removed from storage.
GET/api/me/subjects/{subject_id}/photoDownload the subject's primary reference photo.
GET/api/me/subjects/{subject_id}/photosList all reference photos attached to a subject.
POST/api/me/subjects/{subject_id}/photosAdd an additional reference photo to a subject; the photo is safety-checked by the guard model.
POST/api/me/subjects/{subject_id}/photos/{photo_id}/primaryMake the given photo the subject's primary reference photo.
DELETE/api/me/subjects/{subject_id}/photos/{photo_id}Delete one reference photo from a subject.
GET/api/me/subjects/{subject_id}/photos/{photo_id}/fileDownload a specific reference photo by id.
GET/api/me/subjects/subjects/{subject_id}/trigger-suggestionGet the trigger word that would be auto-generated for this subject, plus a celebrity-safe alternative if the name is high-risk.
PATCH/api/me/subjects/subjects/{subject_id}/triggerSet the subject's trigger word (normalized server-side), optionally forcing the celebrity-safe variant.
3D studio
POST/api/me/images/{image_id}/to-3dTurns one of your generated images into a textured 3D model (GLB).
POST/api/me/models/{model_id}/editRuns a mesh edit on an existing model, producing a new model version.
POST/api/me/models/{model_id}/paintSaves a browser-painted texture atlas as a new version of the model.
POST/api/me/models/{model_id}/meshUploads an edited GLB mesh (from the in-studio Sculpt tool or an external tool like Blender) as a new version of the model.
POST/api/me/models/{model_id}/regenRegenerates a brushed area of the model's texture with a FLUX Fill diffusion pass.
GET/api/me/models/{model_id}/textureDownloads the model's base-colour texture atlas so an editor can paint on it.
GET/api/me/models/{model_id}/fileDownloads the model itself as a .glb file.
GET/api/me/modelsLists your 3D models, newest first.
GET/api/me/models/{model_id}Fetches one model, including live job progress — the polling endpoint for all async 3D operations.
DELETE/api/me/models/{model_id}Deletes one model and its file; models derived from it are kept and detached.
Sharing & Explore
POST/api/me/models/{id}/publishShare a finished 3D model on the public Explore page, or take it back off.
GET/api/public/explore-models no authPublic feed of shared 3D models.
GET/api/public/m/{id}/file no authA shared model's GLB — no auth while its owner keeps it public.
Printing & restoring
GET/api/me/models/{id}/stlThe model as an STL for 3D printing, watertight-merged and scaled to real millimetres.
POST/api/me/images/{id}/upscale (mode: restore)One-click old-photo restore: colorizes when the photo is monochrome or sepia, refreshes the face if there is one, sharpens 2x.
Folders
POST/api/me/foldersCreate a new gallery folder (and its hidden backing order that uploads will attach to).
GET/api/me/foldersList all of the caller's folders, most recently updated first.
GET/api/me/folders/{folder_id}Fetch one folder the caller owns.
PATCH/api/me/folders/{folder_id}Rename a folder.
DELETE/api/me/folders/{folder_id}Delete a folder; the images inside are kept and become loose (unfoldered) library images.
POST/api/me/folders/{folder_id}/imagesUpload image files into a folder; each becomes a normal gallery image that every image operation works on.
POST/api/me/folders/{folder_id}/runRun one image operation (upscale/enhance, fast upscale, remove background, face detail, colorize, repaint) across a whole folder or a selected subset, with an optional dry run that prices the batch first.
POST/api/me/folders/{folder_id}/moveFile existing images the caller owns (generated or uploaded) into this folder.
Pricing
GET/api/pricing/generation-costs no authReturns a Sparks cost table for every curated model at three canonical settings so customers can compare FLUX vs SDXL vs Schnell pricing.
GET/api/pricing/training-costs no authReturns the fixed Sparks price (and USD equivalent) for each LoRA training preset.
GET/api/pricing/image-ops no authQuotes what every image operation (upscale, enhance, face enhance, background removal, colorize) would cost for a source image of the given size.
POST/api/pricing/estimate no authComputes the exact Sparks cost for a specific generation request; powers the live cost meter on the /generate page.
Webhooks
GET/api/me/webhooksList your webhook endpoints.
POST/api/me/webhooksRegister an endpoint to receive events. The signing secret is returned once, at creation.
POST/api/me/webhooks/{id}/testQueue a ping event so you can verify your receiver and signature check.
GET/api/me/webhooks/{id}/deliveriesRecent delivery attempts with errors, for debugging.
DELETE/api/me/webhooks/{id}Remove an endpoint. Pending deliveries are dropped with it.
API keys
GET/api/me/api-keysLists the customer's active (non-revoked) MCP API keys, newest first.
POST/api/me/api-keysCreates a new MCP API key and returns the full key value exactly once.
DELETE/api/me/api-keys/{key_id}Revokes one of the customer's API keys.
Questions or a missing endpoint? Write to support@loralume.com. — Loralume