Martian website screenshot

Martian

Martian operates an LLM model router and gateway that dynamically routes each request to the best underlying model across providers for the optimal balance of quality, latency, and cost. The Martian Gateway exposes a drop-in, OpenAI-compatible REST API (and an Anthropic Messages-compatible surface) so applications can route across a large catalog of models by changing only the base URL.

3 APIs 0 Features
AILLMModel RouterGatewayCost Optimization

APIs

Martian Chat Completions API

OpenAI-compatible chat completions routed dynamically across a large catalog of provider models. Models are addressed with a provider/model-name string, with optional routing co...

Martian Messages API

Anthropic Messages-compatible endpoint that accepts the Anthropic Messages request shape and routes it through the Martian Gateway, enabling Anthropic SDKs and frameworks to use...

Martian Models API

Lists every model currently supported by the Martian Gateway, returning the provider/model-name identifiers usable as routing targets in chat completions and messages requests.

Collections

Pricing Plans

Martian Ai Plans Pricing

3 plans

PLANS

Rate Limits

Martian Ai Rate Limits

4 limits

RATE LIMITS

FinOps

Event Specifications

Martian Gateway Chat Completions Streaming (HTTP + SSE)

AsyncAPI 2.6 description of the Martian Gateway's **chat completion streaming** surface. Martian does not publish a WebSocket API. The Martian Gateway is an OpenAI-compatible mo...

ASYNCAPI

Resources

👥
GitHubOrganization
GitHubOrganization
🔗
LinkedIn
LinkedIn
🔗
Website
Website
🔗
Documentation
Documentation
🔗
Plans
Plans
🔗
RateLimits
RateLimits
🔗
FinOps
FinOps

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Martian Gateway API
  version: '1.0'
request:
  auth:
    type: bearer
    token: '{{bearerToken}}'
items:
- info:
    name: Chat Completions
    type: folder
  items:
  - info:
      name: Create a routed chat completion
      type: http
    http:
      method: POST
      url: https://api.withmartian.com/v1/chat/completions
      body:
        type: json
        data: "{\n  \"model\": \"openai/gpt-4.1-nano\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\"\
          : \"Hello from Martian\"\n    }\n  ],\n  \"max_tokens\": 256,\n  \"stream\": false\n}"
    docs: OpenAI-compatible chat completion routed dynamically across providers. Model uses provider/model-name format. Set
      stream=true for Server-Sent Events.
- info:
    name: Messages
    type: folder
  items:
  - info:
      name: Create a routed message
      type: http
    http:
      method: POST
      url: https://api.withmartian.com/v1/messages
      body:
        type: json
        data: "{\n  \"model\": \"anthropic/claude-sonnet-4\",\n  \"max_tokens\": 256,\n  \"messages\": [\n    {\n      \"\
          role\": \"user\",\n      \"content\": \"Hello from Martian\"\n    }\n  ]\n}"
    docs: Anthropic Messages-compatible request routed through the Martian Gateway.
- info:
    name: Models
    type: folder
  items:
  - info:
      name: List supported models
      type: http
    http:
      method: GET
      url: https://api.withmartian.com/v1/models
    docs: Returns all models currently supported by the Gateway as provider/model-name identifiers.