Skip to Content
Loremind Platform APIErrors & Rate Limits

Errors & Rate Limits

Every common LoreMind API error, what causes it, and how to handle it — plus the rate-limit defaults.

Last verified against LoreMind v1.0.67 (August 2026).

Errors return a JSON body with an error message. Some include extra fields: retryAfter on 429, currentStatus on scanner 409 responses.

Common Errors

StatusErrorReturned byWhat to do
400endpoint-specific validation messagesall endpointsFix the request — each endpoint’s error table lists its exact 400 messages (NPC Interaction, Lore Scanner)
401Invalid API keyPOST /npc/interactThe key is missing, malformed, or revoked — check the full sk_server_* key
401Invalid authenticationeditor-key endpointsMissing or invalid Editor Key (sk_editor_*)
402Insufficient creditscredit-consuming requests (/npc/interact, scanner submit/confirm)Top up or enable auto-reload — see Insufficient Credits below
403Invalid authenticationPOST /npc/interactAn Editor Key was used where a Server Key is required
403Access deniedscanner job endpointsThe job belongs to a different project
404Project not foundPOST /npc/interactInvalid project or key
404Entity Mind not foundPOST /npc/interactCheck entityMindId against the dashboard
404Job not foundscanner job endpointsInvalid jobId
409Job is not awaiting uploadscanner confirm/cancelJob already confirmed, expired, or cancelled — the response includes currentStatus
429Rate limit exceededPOST /npc/interactWait and retry — see Rate Limits below
503Generation failedPOST /npc/interactLLM error — retry

Insufficient Credits (402)

API usage consumes credits from your team balance: your subscription plan’s monthly credit allotment is used first, then top-up credits (which never expire). When the balance runs out, requests fail with 402:

{ "error": "Insufficient credits" }

Handle this gracefully in your game and top up (or enable auto-reload) in the dashboard . See Credits & Billing for how costs work.

Rate Limits

NPC interactions (POST /npc/interact) are rate limited per minute, both per player (using playerId) and per project. Defaults are 60 requests/minute per player and 200 requests/minute per project.

Both limits are configurable in Dashboard → Rate Limits.

Response Headers

When rate limited, the API returns 429 with:

  • Retry-After header — seconds until retry
  • retryAfter field in the JSON body

SDK Error Codes (Unity)

When you use the Unity SDK, failures surface as codes on NPCResponse.error rather than raw HTTP statuses:

SDK codeHTTPMeaning
CONFIG_ERRORSDK not configured (check Control Panel settings)
VALIDATION_ERROR400Server rejected the request
AUTH_FAILED401Invalid API key
INSUFFICIENT_CREDITS402Out of credits
RATE_LIMITED429Too many requests (wait retryAfter seconds)
SERVICE_UNAVAILABLE503AI service unavailable (retry)
REQUEST_FAILEDotherOther HTTP error (check the message field)
TRANSPORT_ERRORRequest failed to send (check network)

Full details, including custom-backend transport codes, are in the SDK API Reference.

Next Steps

Last updated on