MarsAI is a unified, OpenAI-compatible API for AI model inference. One endpoint and one key give you frontier and open-source models, served on our own GPU infrastructure.
If you've used the OpenAI API before, you already know ours. Point your existing client at the base URL below, swap in your MarsAI key, and every request, response, and streaming format behaves exactly as you expect.
Base URL
HTTPS
https://api.marsai.com/v1
What you get
One API for frontier and open models, with automatic failover
Drop-in OpenAI compatibility — no rewrites required
Usage-based pricing with no markup on premium models
Next steps
Continue to the Quickstart to make your first request.
All requests are authenticated with a bearer token sent in the Authorization header.
Your key carries the full permissions of your account, so keep it secret. Store it in an environment variable instead of hard-coding it, and never expose it in client-side code.
Example header
HTTP
Authorization: Bearer $MarsAI_API_KEY
Rotate keys regularly and use a separate key for each environment.