# Home

Multi-model AI gateway with credits-based billing, agentic orchestration, and 59 pre-built agents.

## What is Majestix AI Inference Hub?

Majestix AI Inference Hub is an AI-as-a-Service backend that gives you unified access to a dynamically updated model catalog through a single API with a single billing system. The live platform currently exposes **42 enabled models**.

Instead of managing API keys, rate limits, and billing for each model separately, you get one endpoint, one credit system, and automatic fallback when things go wrong.

## Key Features

**Multi-Model Gateway**

* 42 enabled models across chat, coding, reasoning, vision, and image generation
* Automatic fallback on all paths (non-streaming, streaming chat, streaming code)
* Auto-routing based on task complexity
* SSE streaming for all models

**Credits System**

* Pay-as-you-go with simple credit-based pricing
* 1 credit = $0.001 USD
* Plans: Free (500 cr/mo), Guru ($10/mo, 10K cr), Pro ($50/mo, 55K cr)
* Reservation-based billing prevents overcharges

**Authentication**

* API keys for programmatic access (VSCode, CLI, SDK)
* Firebase Auth + App Check for web apps
* OIDC for service-to-service communication

**Agentic Orchestration**

* Scheduled agent tasks with Cloud Scheduler cron triggers
* Ensemble consensus: 3 models iterate until quality threshold met
* Swarm pipelines: multi-agent sequential workflows with DAG dependencies
* Folder-based agent pack import with bundled swarm execution
* 59 pre-built agents for common tasks
* Per-user limits: 200 tasks, 50 scheduled tasks
* Auto-pause after 3 consecutive scheduled failures

**Security**

* 8-layer defense-in-depth for agent execution
* KMS-encrypted credentials at rest
* DNS-pinned requests (TOCTOU prevention)
* Default-deny URL whitelist

## Architecture at a Glance

```
Clients (Web, VSCode, CLI, Cloud Tasks)
    |
    v
inference-api (Cloud Run)          agent-executor (Cloud Run)
  /chat, /code, /models             /execute, /ensemble, /swarm
  Credits + Auth + Routing           Agentic loops + Tools + Security
    |                                    |
    v                                    v
  AI Model APIs                    External APIs (DNS-pinned)
                                   Firestore + Cloud KMS
```

## Quick Links

| Section                                                       | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Getting Started](https://docs.majestix.ai/getting-started)   | Authentication, credits, first API call                             |
| [Web App](https://docs.majestix.ai/web-app)                   | Chat interface, settings, billing, agents, and every page in detail |
| [API Reference](https://docs.majestix.ai/api-reference)       | Endpoints, request/response formats                                 |
| [Models](https://docs.majestix.ai/models)                     | Live model catalog, pricing, and free-tier routing rules            |
| [Agents](https://docs.majestix.ai/agents)                     | Scheduled tasks, tools, credentials, security                       |
| [Orchestration](https://docs.majestix.ai/orchestration)       | Ensemble consensus and swarm pipelines                              |
| [Architecture](https://docs.majestix.ai/architecture)         | System design, infrastructure, security                             |
| [VSCode Extension](https://docs.majestix.ai/vscode-extension) | IDE integration                                                     |
