> For the complete documentation index, see [llms.txt](https://docs.majestix.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.majestix.ai/readme.md).

# 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 **55 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**

* 55 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](/getting-started.md)   | Authentication, credits, first API call                             |
| [Web App](/web-app.md)                   | Chat interface, settings, billing, agents, and every page in detail |
| [API Reference](/api-reference.md)       | Endpoints, request/response formats                                 |
| [Models](/models.md)                     | Live model catalog, pricing, and free-tier routing rules            |
| [Agents](/agents.md)                     | Scheduled tasks, tools, credentials, security                       |
| [Orchestration](/orchestration.md)       | Ensemble consensus and swarm pipelines                              |
| [Architecture](/architecture.md)         | System design, infrastructure, security                             |
| [VSCode Extension](/vscode-extension.md) | IDE integration                                                     |
