> ## Documentation Index
> Fetch the complete documentation index at: https://docs.megallm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MegaLLM Documentation

> Welcome to MegaLLM - the universal AI platform that connects 70+ large language models through a single, powerful API.

> [!NOTE]
>
> **One API, Unlimited Possibilities**: Access GPT-5, Claude Opus 4.1, Gemini 2.5 Pro, and more models without juggling multiple providers.

## What is MegaLLM?

MegaLLM is your **"super-API"** for AI. Instead of integrating with OpenAI, Anthropic, Google, and other providers separately, you get access to all their models through one unified interface.

### Why MegaLLM?

* **Instant Model Switching**: Change models with one parameter
* **Automatic Fallbacks**: Never go down when one model fails
* **Unified Billing**: One invoice for all your AI usage
* **Zero Integration Overhead**: Drop-in replacement for existing code

## Quick Start

> [card] [Models Catalog](https://docs.megallm.io/en/home/models.md)
>
> Browse 70+ AI models with pricing and capabilities

> [card] [Quick Start](https://docs.megallm.io/en/dev-docs/getting-started/quick-start.md)
>
> Get your API key and make your first request

> [card] [OpenAI API](https://docs.megallm.io/en/dev-docs/openai/overview.md)
>
> Use OpenAI-compatible endpoints with any model

> [card] [Anthropic API](https://docs.megallm.io/en/dev-docs/anthropic/overview.md)
>
> Access Claude models with Anthropic format

## Core Features

> [card] [Automatic Fallback](https://docs.megallm.io/en/home/faq.md)
>
> Ensure high availability with intelligent model switching

> [card] [Authentication](https://docs.megallm.io/en/dev-docs/getting-started/authentication.md)
>
> Simple API key management and security

> [card] [FAQ](https://docs.megallm.io/en/home/faq.md)
>
> Frequently asked questions and troubleshooting

## Who Uses MegaLLM?

### Developers

* Experiment with different models without rewriting code
* Reduce integration complexity from weeks to minutes
* Build more robust applications with automatic fallbacks

### Businesses

* Ensure high availability for customer-facing AI features
* Optimize costs across multiple model providers
* Future-proof AI investments with provider flexibility

### Researchers

* Access cutting-edge models as they're released
* Run comprehensive evaluations and benchmarks
* Test model performance across different tasks

## Example: Switching Models

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://ai.megallm.io/v1",
    api_key="your-api-key"
)

# Try GPT-5 for complex reasoning
response = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Analyze this data..."}]
)

# Switch to Claude for analysis
response = client.chat.completions.create(
    model="claude-3.7-sonnet",
    messages=[{"role": "user", "content": "Analyze this data..."}]
)

# Use Claude for creative writing
response = client.chat.completions.create(
    model="claude-opus-4-1-20250805",
    messages=[{"role": "user", "content": "Write a story about..."}]
)
```

## Popular Model Combinations

| Use Case | Primary Model | Fallback Models | Why |
| - | - | - | - |
| **Chatbots** | gpt-4o-mini | gpt-3.5-turbo, claude-3.5-sonnet | Fast, cost-effective |
| **Code Generation** | gpt-5 | claude-3.7-sonnet, gpt-4o | Specialized for code |
| **Analysis** | claude-opus-4-1-20250805 | gpt-5, gemini-2.5-pro | Best reasoning |
| **Creative Writing** | claude-opus-4-1-20250805 | gpt-5, claude-sonnet-4 | Creative excellence |

## Getting Started

> [!TIP]
>
> **Ready to get started?** Head to our [Quick Start guide](https://docs.megallm.io/dev-docs/getting-started/quick-start) to make your first API call in minutes.

### 3-Step Setup

1. **Get API Key**: Sign up and get your MegaLLM API key
2. **Choose Format**: Use OpenAI or Anthropic API format
3. **Start Building**: Make your first request to any of 70+ models

## Need Help?

* **Browse our guides**: Comprehensive documentation for every feature
* **Check the FAQ**: Common questions and solutions
* **Contact support**: [support@megallm.io](mailto:support@megallm.io) for technical assistance
* **Use search**: Press Cmd+K to search all documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.