API Documentation
Build powerful applications with the MAR AI API. Comprehensive guides, code examples, and references to help you integrate AI capabilities.
Getting started
Quick start guide
Example request
curl https://api.gomarai.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mar-1",
"messages": [{"role": "user", "content": "Hello!"}]
}'Get your API key from your account dashboard, include it in the Authorization header, and you are ready to make requests.
Key topics
Essential API concepts
Authentication
Secure API access using bearer tokens. All requests must include your API key in the Authorization header.
Rate Limits
Understand request limits and quotas. Enterprise plans include higher limits and dedicated capacity.
Error Handling
Standard HTTP status codes with detailed error messages to help you debug issues quickly.
Webhooks
Receive real-time notifications for events like completion callbacks and usage alerts.
Reference
Available endpoints
/v1/completions
Generate text completions
/v1/chat/completions
Multi-turn conversations
/v1/embeddings
Generate text embeddings
/v1/models
List available models
Libraries
SDKs & Libraries
Official and community-maintained libraries make it easy to integrate MAR AI into your applications in your preferred language.
Python
Official
Node.js
Official
Go
Community
Rust
Community
Ready to build?
Join our waitlist to get early access to the API when it launches. Enterprise customers can contact us for priority access and custom solutions.