Developer Docs
iOS 16+ · Android API 26+ · Swift · Kotlin · REST API
Everything you need to configure MAIG and integrate the SDK into your app. Start by setting up your project in the dashboard, then drop the iOS or Android SDK into your project.
Dashboard Setup
Create a project, add AI provider credentials, configure routing, and get your API key.
iOS SDK
Integrate the Swift SDK via SPM. Generate text, stream responses, and handle errors.
Android SDK
Integrate the Kotlin SDK via Gradle. Generate text, stream tokens with Flow, and handle errors.
API Compatibility
Which OpenAI chat completions parameters are supported per provider, and how dropped fields are handled.
Prompt Management
Store and version prompts server-side. Sync changes to your app without shipping a new release.
API Reference
Complete endpoint documentation with request/response examples and error codes.
Migration Guide
Switching from OpenAI? Change one line of code to use MAIG.
Rate Limits
Monthly plan limits, per-minute rate limiting, and quota rules by plan.
Quick reference
Gateway endpoint
https://api.maig.dev/v1/chat/completions
Authentication
All requests require a Bearer token in the Authorization header. Your project API key starts with maig_ and is generated when you create a project.
Request format
The gateway accepts the standard OpenAI chat completions request body, so any client already using OpenAI's API can be pointed at MAIG with a key and URL swap.
Supported providers
- OpenAI — GPT-4o, GPT-4, GPT-3.5 Turbo
- Anthropic — Claude 3.5 Sonnet, Claude 3 Haiku, Claude 3 Opus
- Google — Gemini 2.0 Flash, Gemini 1.5 Pro
Need help?
Email support@maig.dev with your account email and a description of the issue. We typically respond within 1–2 business days.