openapi: 3.0.1 info: title: Martian Gateway Chat Completions Models API description: OpenAPI specification for the Martian Gateway, an LLM model router. The Gateway exposes an OpenAI-compatible chat completions endpoint, an Anthropic Messages-compatible endpoint, and a models listing endpoint. Requests are routed dynamically across a catalog of provider models. Models are addressed with a provider/model-name string (for example, openai/gpt-4.1-nano). termsOfService: https://www.withmartian.com contact: name: Martian url: https://www.withmartian.com version: '1.0' servers: - url: https://api.withmartian.com description: Martian Gateway production server tags: - name: Models paths: /v1/models: get: operationId: listModels tags: - Models summary: List supported models description: Returns a JSON object containing all models currently supported by the Martian Gateway. The returned identifiers are provider/model-name strings usable as routing targets. security: - bearerAuth: [] responses: '200': description: A list of models supported by the Gateway. content: application/json: schema: $ref: '#/components/schemas/ModelList' '401': description: Authentication failed (missing or invalid API key). components: schemas: Model: type: object properties: id: type: string description: The provider/model-name identifier for the model. example: openai/gpt-4.1-nano object: type: string example: model owned_by: type: string description: The upstream provider that owns the model. ModelList: type: object properties: object: type: string example: list data: type: array items: $ref: '#/components/schemas/Model' securitySchemes: bearerAuth: type: http scheme: bearer description: Provide your Martian API key as a Bearer token in the Authorization header.