Skip to main content
Base URL: https://ai.megallm.io/v1 for all OpenAI-compatible endpoints

Available Endpoints

Chat Completions

Generate conversational responses with GPT models

Streaming

Real-time streaming responses with Server-Sent Events

Function Calling

Execute functions and tools with parallel support

Models

Browse available models and capabilities

Quick Example

Supported Models

Features

Full Compatibility

Drop-in replacement for OpenAI API - use your existing code without changes.

High Performance

Fast response times with optimized infrastructure.

Usage Tracking

Monitor your API usage and costs.

SDK Support

MegaLLM works with all OpenAI-compatible SDKs:
  • Python: openai official SDK
  • Node.js: openai official SDK
  • Go: go-openai
  • Rust: async-openai
  • Java: openai-java
  • C#: OpenAI-DotNet

Rate Limits

Migration Guide

Migrating from OpenAI to MegaLLM is simple:
That’s it! All your existing code continues to work.

Error Handling

MegaLLM returns OpenAI-compatible error responses:
Pro Tip: Enable debug mode with X-Debug: true header to get detailed error information during development.

Next Steps