Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error Reference

MedRAG returns JSON errors with an error field:

{
  "error": "error_code",
  "message": "Optional human-readable description"
}

Error Codes

CodeHTTP StatusDescriptionResolution
missing_auth401No Authorization headerSend Authorization: Bearer <api-key>
invalid_api_key401Malformed or unknown API keyCheck the key and header format
forbidden403API key role is too low for this endpointUse a key with a higher role
not_found404Resource doesn’t exist or isn’t accessible to your keyCheck the resource ID
payment_required402Account suspended for non-paymentSettle the outstanding invoice
quota_exhausted402Free plan query quota used upUpgrade your plan or wait for reset
document_limit_reached402Plan’s document limit reachedDelete documents or upgrade
chunk_quota_exceeded402Plan’s chunk limit reachedDelete documents or upgrade
knowledge_base_limit_reached403Plan’s knowledge base limit reachedUpgrade your plan
enterprise_plan_required403Endpoint needs the Enterprise planUpgrade your plan
addon_not_enabled403Transcription/report add-on not enabledEnable the add-on
document_too_large413Document exceeds the plan’s size limit (max_bytes returned)Reduce document size or upgrade
sub_tenant_storage_quota_exceeded413Sub-tenant storage quota reached (current, limit returned)Raise the sub-tenant quota or delete documents
validation_error / message422Invalid request bodyCheck required fields and formats
rate_limit_exceeded429Too many requestsWait for Retry-After seconds
per_user_rate_limit_exceeded429Per-user limit hit (X-User-Id)Wait for Retry-After seconds
sub_tenant_chunk_quota_exceeded429Sub-tenant chunk quota reachedRaise the sub-tenant limit
tenant_pool_quota_exceeded429Tenant-wide chunk pool exhaustedUpgrade or delete documents
internal_error500Server errorRetry; contact support if persistent
translation_unavailable / *_unavailable503Feature not available on this instance right nowRetry later

Validation errors (422) and some others return a plain-language message in error (for example "name must be 1-200 characters") rather than a code. Not every error includes a message field.

Rate Limit Errors

When rate-limited, the response includes:

{
  "error": "rate_limit_exceeded",
  "retry_after_seconds": 5,
  "docs_url": "https://docs.medrag.eu/usage-limits"
}

Quota Errors

When a plan quota is exhausted:

{"error": "quota_exhausted"}

Document and chunk limits additionally return current, limit and docs_url.