Bifrost - your first reliable AI gateway

4 months ago

Bifrost is an AI gateway for apps that call large language models. Your app keeps an OpenAI-compatible API shape, while Bifrost handles provider access, routing, retries, fallbacks, caching, and request logs from one local gateway.

Ask about this presentation

Chapters

  1. 0:00Your first reliable AI gateway
  2. 0:13One gateway in front of many providers
  3. 0:30Start the gateway locally
  4. 0:44Add provider keys in the Web UI
  5. 0:57Send the first routed chat request
  6. 1:10Make reliability a gateway concern
  7. 1:26Watch requests, then tune the path
Show transcript
  1. Bifrost is an AI gateway for apps that call large language models. Your app keeps an OpenAI-compatible API shape, while Bifrost handles provider access, routing, retries, fallbacks, caching, and request logs from one local gateway.

    Slide text
    Bifrost

    One OpenAI-compatible endpoint for providers, routing, logs, and failover.

    app → Bifrost → 20+ providers
  2. The mental model is simple. Put Bifrost between your application and the model providers. It exposes a unified API, then resolves the provider and model behind the scenes. The docs describe support for more than twenty providers, including OpenAI, Anthropic, AWS Bedrock, Google Vertex, and Azure.

    Slide text
    Bifrost architecture diagram
    OpenAI format
    Same chat completions endpoint.
    20+ providers
    OpenAI, Anthropic, Bedrock, Vertex, and more.
  3. The gateway quickstart starts with zero configuration. Run the NPX binary, or run the Docker image on port eight thousand eighty. Then open localhost port eight thousand eighty. Bifrost stores its local data in an app directory and brings up the web interface.

    Slide text
    # Install and run locally
    npx -y @maximhq/bifrost
    
    # Or run the HTTP API with Docker
    docker run -p 8080:8080 maximhq/bifrost
    
    # Open the Web UI
    open http://localhost:8080
    Bifrost getting started screen
  4. From the web interface, go to Model Providers and configure the providers you want. The quickstart calls out visual provider setup, real-time configuration, live monitoring, and governance management. You can also use config dot JSON or the management API later.

    Slide text
    Bifrost provider configuration UI
    Model Providers
    Add OpenAI, Anthropic, Mistral, and more.
    Live config
    UI changes are saved immediately.
  5. Now send the first chat completion to slash v one slash chat slash completions. The model string openai slash gpt four o mini tells Bifrost which provider and model to use. The app still talks to an OpenAI-style endpoint.

    Slide text
    curl -X POST http://localhost:8080/v1/chat/completions \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai/gpt-4o-mini",
        "messages": [
          {"role": "user", "content": "Hello, Bifrost!"}
        ]
      }'

    The caller uses an OpenAI-style endpoint. Bifrost resolves the provider.

  6. This is the reason to add a gateway. Bifrost can retry transient failures with backoff, rotate keys on per-key failures, and then fall back to another provider when the primary path is exhausted. Virtual keys can also restrict and weight provider choices for different callers.

    Slide text
    Retries
    Transient failures use exponential backoff.
    Key rotation
    Rate limits and bad keys can move to another key.
    Fallbacks
    A failed provider can move to the next provider.
    Routing
    Virtual keys can restrict and weight providers.
    Bifrost retry configuration UI
  7. That is Bifrost's first win: start the gateway, configure providers, make one normal chat call, and get a place to see and control every request. Next, follow the gateway setup guide, then go deeper on retries, virtual key routing, observability, and local cache.

    Slide text
    Bifrost live log stream
    logs → routing → cache

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York