Martian Gateway Documentation
Martian Gateway provides unified access to 200+ AI models through a single API, enabling you to select the most effective model for your use case while maintaining compatibility with popular frameworks.
Key Benefits
- Access to 200+ models from leading providers
- Compatibility with OpenAI and Anthropic APIs
For example, simply populate the
modelfield when making requests:
curl https://api.withmartian.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MARTIAN_API_KEY" \
-d '{
"model": "openai/gpt-4.1-nano",
"messages": [
{
"role": "user",
"content": "What is Olympus Mons?"
}
]
}'
Monitoring & Analytics
Track your usage through the Martian Dashboard:
- Real-time Usage: Monitor API calls, tokens, and costs
- Model Performance: Compare accuracy and latency across models
- Request History: Debug and analyze API interactions
Getting started
Get your API key from the Martian Dashboard and start making requests immediately. Our API is fully compatible with existing OpenAI and Anthropic SDKs, requiring minimal code changes.
Resources
Integrations
SDK and code editor integrations for OpenAI, Anthropic, Cursor, Claude Code, Cline, Aider, and more.
Code Examples
Practical examples and code snippets for common use cases, from basic chat to advanced tool use.
Getting Help
Martian Gateway provides the following resources to help you use the API:
- Support: Email us at support@withmartian.com
Ready to get started? Grab your API key and make your first request in under three minutes!