API referenceGeneration
Personal LoRAs
Personal LoRAs belong to the authenticated account and appear in the same library as Sogni Web. Use Authorization: Bearer $SOGNI_API_KEY (or the api-key header) with these endpoints. Responses use { "status": "success", "data": ... } and are private, non-cacheable.
#Library endpoints
| Method and path | Result |
|---|---|
GET /v1/loras/personal |
data.loras, supported import targets in data.models, and data.limits |
GET /v1/loras/personal/:id |
One owned import and its current status |
GET /v1/loras/personal/catalog |
Ready, usable entries in data.loras, with loraId, modelIds, description, and ui strength/default/content-filter metadata |
POST /v1/loras/personal |
202 with the queued import record |
DELETE /v1/loras/personal/:id |
Removes an owned library entry; data is empty |
Import and generation require an active Unlimited subscription. Listing and removing owned entries remain available after expiry. The list returns current quotas; limits.fileBytes is null when that information is temporarily unavailable. An unavailable or unowned ID returns 404.
#Import and inspect
curl --fail-with-body https://api.sogni.ai/v1/loras/personal \
-H "Authorization: Bearer $SOGNI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url":"https://huggingface.co/author/repository/resolve/main/style.safetensors","name":"My style","modelId":"krea2_turbo_fp8_scaled","rightsConfirmed":true}'
Choose modelId from the library's models list. Supply a supported Hugging Face safetensors URL or Civitai model/version URL. Set rightsConfirmed only after confirming permission to use that file.
Import is asynchronous. Poll the returned ID using GET /v1/loras/personal/:id, backing off on 429. Statuses are queued, validating, review, ready, rejected, and revoked. Generate only when ready. Show reason and failureCode when supplied. Records also include name, source URL, compatible model IDs, timestamps, size when known, and user-facing requirements. Importing an adapter does not train a new model.
#Generate with a ready adapter
Pass an owned catalog entry's loraId in loras, with the corresponding strength in loraStrengths, to a compatible hosted tool or SDK project. Preserve array order when stacking. Use ui.default when the user did not choose a strength and follow the entry's requirements and content-filter setting. Never infer compatibility from the adapter's name: the selected model must occur in modelIds.
Personal adapters work with compatible Krea, Qwen, and H3 models exposed by discovery, including non-audio FastH3 Two-Stage variants. H3 audio-guided modes do not support LoRAs. The server verifies ownership, readiness, entitlement, and model compatibility at submission; an unsupported personal adapter is rejected rather than silently ignored.
const library = await sogni.projects.personalLoras.list();
const { loras } = await sogni.projects.availableLoras({
modelId: 'krea2_turbo_fp8_scaled',
includePersonal: true,
});
const entry = await sogni.projects.personalLoras.get(importId);
// On an explicit removal request:
await sogni.projects.personalLoras.remove(importId);
The public catalog remains GET /v1/loras/comfy?modelId=.... Including personal entries in SDK discovery is opt-in and requires authentication; private rows never enter the public catalog cache.