Cut model costs with hosted open models

Updated August 10, 2026

Goal: keep working in Claude Code, but send the requests to a lower-cost hosted open model that speaks the Anthropic API.

What you need

  • An account and API key from a service that hosts open models behind an anthropic-compatible endpoint. z.ai is one example, with hosted GLM models and a Claude Code setup path. We don’t rank hosts or quote prices because both change faster than this page does.
  • Nothing else. Storing keys and configuring endpoints is free on every plan.

Steps

  1. Get the base URL and key from your provider’s docs.

  2. Add an open-model connection in Settings → agents → providers & keys:

    FieldValue
    Labelz-ai
    Kindanthropic-compatible
    Base URLhttps://api.z.ai/api/anthropic
    Keythe key from that provider

    The key goes to your macOS Keychain and shows masked in the field.

  3. Check it’s alive with crystl status. A 401 or 403 counts as reachable on purpose: something is listening and it says your credentials are the problem, which is a different fix from a dead address.

  4. Open a new shard. Existing shards keep the environment they started with, so this only takes effect on a fresh one.

What you’ll see when it works

crystl status shows the slot as reachable, and in the new shard echo $ANTHROPIC_BASE_URL returns the provider’s URL. Claude Code runs as usual, against their models.

Your Anthropic key stays home. A real hosted Anthropic key is never sent to a configured endpoint. crystl sends the slot’s own key, or a documented dummy value when the endpoint doesn’t need one.

Two things to weigh. These are third-party services with their own terms, their own retention policy, and their own view of your code, so read the terms the way you would for any vendor. And quality varies by task: one of them can be great at mechanical work and weak on a reasoning-heavy change, and that ordering isn’t stable between providers or over time. Try it on your own work rather than trusting a benchmark.

A hosted open model doesn’t have the one-machine limit a local GPU does, so you can fan out on it the way you would on any hosted agent.

Go deeper