API Reference

Comprehensive documentation for the Martian API, including endpoint specifications, authentication methods, supported models, and advanced features.

All Martian endpoints are compatible with both OpenAI and Anthropic client libraries, making it easy to integrate with your existing codebase.

Need an API key? Get yours from the Martian Dashboard.

API Documentation

Authentication

Learn how to authenticate your API requests using API keys and bearer tokens.

API Endpoints

Detailed reference for all endpoints including parameters, request formats, and responses.

Available Models

Browse 200+ AI models from leading providers with real-time pricing information.

Advanced Features

Explore cost optimization, streaming, caching, prompt caching, and function calling capabilities.

Error Handling

Understand error codes, status codes, and how to handle API errors gracefully.


Quick Links

Get Started with Quickstart

Learn how to make your first API request in under three minutes.

Read more

Explore Integrations

Integrate Martian with Cursor, Cline, Aider, and more code editors.

Read more