InferiaLLM
API Reference

Filtration Gateway

Security, Authentication, and Policy Endpoints

The Filtration Gateway is the security control plane. It handles authentication, RBAC, guardrails, and policy enforcement.

Base URL

http://localhost:8000

Authentication Endpoints

POST /auth/login

Authenticate user and receive JWT tokens.

Request:

{
  "email": "user@example.com",
  "password": "password123",
  "totp_code": "123456"  // Optional, required if 2FA enabled
}

Response:

{
  "access_token": "eyJ...",
  "refresh_token": "eyJ...",
  "token_type": "bearer",
  "user": { "id": "...", "email": "...", "role": "admin" }
}

POST /auth/refresh

Refresh access token using refresh token.

GET /auth/me

Get current user information.

GET /auth/organizations

List organizations the user belongs to.

POST /auth/switch-org

Switch active organization context.

2FA Endpoints

  • POST /auth/totp/setup - Initialize TOTP setup
  • POST /auth/totp/verify - Verify and enable TOTP
  • POST /auth/totp/disable - Disable TOTP

Management Endpoints

Deployments

MethodEndpointDescription
GET/management/deploymentsList deployments
POST/management/deploymentsCreate deployment
GET/management/deployments/{id}Get deployment details
DELETE/management/deployments/{id}Delete deployment
GET/management/deployments/{id}/logsGet inference logs
GET/management/deployments/recent-logsGet all recent logs

API Keys

MethodEndpointDescription
GET/management/api-keysList API keys
POST/management/api-keysCreate API key
DELETE/management/api-keys/{id}Revoke API key

Configuration

MethodEndpointDescription
GET/management/config/{policy_type}Get policy config
POST/management/config/{policy_type}Update policy config
GET/management/config/providersList provider configs
POST/management/config/providersUpdate provider config

Knowledge Base

MethodEndpointDescription
GET/management/knowledge-base/collectionsList collections
POST/management/knowledge-base/collectionsCreate collection
POST/management/knowledge-base/uploadUpload documents

Prompt Templates

MethodEndpointDescription
GET/management/promptsList templates
POST/management/promptsCreate template
PUT/management/prompts/{id}Update template

Admin Endpoints (RBAC)

Roles

MethodEndpointDescription
GET/admin/rolesList roles
POST/admin/rolesCreate role
PUT/admin/roles/{name}Update role
DELETE/admin/roles/{name}Delete role
GET/admin/roles/permissions/listList available permissions

Users

MethodEndpointDescription
GET/admin/usersList organization users
PUT/admin/users/{id}/roleUpdate user role

Audit Endpoints

MethodEndpointDescription
GET/audit/logsRetrieve audit logs (Admin only)

Internal Endpoints

These endpoints are for service-to-service communication and require INTERNAL_API_KEY.

MethodEndpointDescription
POST/internal/context/resolveResolve API key to deployment config
POST/internal/guardrails/scanScan content for safety violations
POST/internal/prompt/processProcess prompt (RAG + templates)
POST/internal/policy/check_quotaCheck user quota
POST/internal/policy/track_usageTrack usage statistics
POST/internal/logs/createCreate inference log entry

On this page