Getting Started

Get up and running with Mosaic in just a few minutes.

Installation

Install Mosaic using your preferred package manager:

terminal

Configuration

Create a .env file in your project root with your API keys:

.env

Tip

You only need to configure the API keys for the providers you plan to use. Mosaic supports both OpenAI and Anthropic models.

Supported Models

🤖 OpenAI

  • • gpt-5
  • • gpt-5-mini
  • • gpt-5-nano
  • • gpt-5.1

🧠 Anthropic

  • • claude-sonnet-4.5
  • • claude-haiku-4.5
  • • claude-opus-4.5

Create Your First Agent

Here's a simple example to create and run your first AI agent:

index.ts

Switching Providers

Mosaic provides a unified API across providers. Simply change the model name to switch:

providers.ts

Next Steps