# MegaLLM > MegaLLM is a unified AI API gateway that gives developers access to 70+ LLMs (GPT-5, Claude, Gemini, Llama, Mistral, and more) through a single OpenAI-compatible API. ## What is MegaLLM? MegaLLM is an AI API gateway designed for developers who want to access multiple large language models without managing multiple API keys and integrations. Instead of integrating with OpenAI, Anthropic, Google, Meta, and dozens of other providers separately, you can use MegaLLM's single unified API that's compatible with the OpenAI SDK. ## Key Features - **Single API for 70+ Models**: Access GPT-5, Claude 4, Gemini 2.5 Pro, Llama 3, Mistral, Command R+, and 65+ other models through one API - **OpenAI-Compatible**: Change one line of code to switch from OpenAI to MegaLLM - works with existing OpenAI SDK code - **Smart Fallbacks**: Automatic failover between providers if one model is unavailable or rate-limited - **Real-Time Analytics**: Track token usage, costs, latency, and errors across all models in one dashboard - **Sub-100ms Routing**: Fast API gateway with minimal overhead - 99.99% uptime SLA - **Pay-As-You-Go**: No monthly fees - only pay for what you use with transparent per-token pricing - **Volume Discounts**: Save up to 20% on high-volume usage (10M+ tokens/month) ## Supported Model Providers - OpenAI (GPT-5, GPT-4, GPT-3.5) - Anthropic (Claude 4 Opus, Claude 4 Sonnet, Claude 4 Haiku) - Google (Gemini 2.5 Pro, Gemini 2.0 Flash) - Meta (Llama 3.1 405B, Llama 3.1 70B, Llama 3.1 8B) - Mistral AI (Mistral Large 2, Mistral Small) - Cohere (Command R+, Command R) - Perplexity (Sonar models) - Together AI (various open-source models) - DeepSeek, Yi, Qwen, and 50+ more ## Quick Start ### Python (OpenAI SDK) ```python from openai import OpenAI # Just change base_url and api_key - everything else stays the same client = OpenAI( base_url="https://ai.megallm.io/v1", api_key="your-megallm-api-key" ) response = client.chat.completions.create( model="gpt-4o", # or claude-4-opus, gemini-2.0-flash-exp, etc. messages=[{"role": "user", "content": "Hello, world!"}] ) print(response.choices[0].message.content) ``` ### JavaScript/TypeScript (OpenAI SDK) ```typescript import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://ai.megallm.io/v1', apiKey: 'your-megallm-api-key' }); const response = await client.chat.completions.create({ model: 'claude-4-opus', messages: [{ role: 'user', content: 'Hello, world!' }] }); console.log(response.choices[0].message.content); ``` ### cURL ```bash curl https://ai.megallm.io/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-megallm-api-key" \ -d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Hello!"}] }' ``` ## Pricing MegaLLM uses transparent pass-through pricing with a small markup: - **Free Tier**: $10 in credits included on signup - no credit card required - **Dev Plan**: $4.99/month for $100 in premium credits (20x value) - **Pay-As-You-Go**: Typically 10-20% markup on provider costs - **Volume Discounts**: Contact us for 10M+ tokens/month ### Example Pricing (per 1M tokens): | Model | Input | Output | |-------|-------|--------| | GPT-4 Turbo | $10 | $30 | | Claude 4 Opus | $15 | $75 | | Gemini 2.0 Flash | $0.075 | $0.30 | | Llama 3.1 405B | $5 | $16 | See full pricing at https://megallm.io/pricing ## Use Cases - **AI Application Development**: Build apps that need access to multiple AI models - **Model Comparison**: Test different models side-by-side before committing to one - **Cost Optimization**: Route requests to cheaper models when appropriate - **Reliability**: Automatic failover ensures your app stays online even if one provider has issues - **Prototyping**: Free tier lets you experiment with 70+ models without commitment ## Links - Homepage: https://megallm.io - Documentation: https://docs.megallm.io - API Reference: https://docs.megallm.io/en/api-reference - Pricing: https://megallm.io/pricing - Models List: https://megallm.io/models - News & Updates: https://megallm.io/news - Status Page: https://status.megallm.io - Dashboard: https://megallm.io/dashboard ## Company Information - **Legal Entity**: Ghostlytics Payments, LLC - **Jurisdiction**: Delaware, USA - **Location**: Dover, DE - **Support Email**: support@megallm.io - **Twitter**: @megallmio - **Discord**: https://discord.gg/Megallm - **GitHub**: https://github.com/Megallm ## API Documentation For full API documentation including: - All available models and their capabilities - Advanced features (streaming, function calling, vision) - Rate limits and quotas - Error handling - Best practices Visit: https://docs.megallm.io ## Getting Started 1. Sign up at https://megallm.io/auth/signup 2. Get your API key from the dashboard 3. Replace your OpenAI base URL with `https://ai.megallm.io/v1` 4. Start using 70+ models immediately No credit card required for free tier.