← Back to Blog
Tutorial

Hermes Agent with FastMetal: a coding agent without a Codex subscription

FastMetal

You don't need a monthly plan to use a coding agent. Hermes Agent from Nous Research is open source under the MIT license, so the tool itself is free, and it lets you choose where the model calls go. Point it at FastMetal and you pay only for the tokens you use.

Below: the setup, then an honest look at when that beats a Codex subscription and when it doesn't.

1. Install Hermes

macOS, Linux or WSL2:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

Windows, from PowerShell:

iex (irm https://hermes-agent.nousresearch.com/install.ps1)

2. Add FastMetal as a provider

Register FastMetal as a named provider in ~/.hermes/config.yaml:

providers:
  fastmetal:
    api: https://api.fastmetal.ai/v1
    key_env: FASTMETAL_API_KEY
    transport: chat_completions
    default_model: anthropic-claude-sonnet-5

model:
  provider: custom:fastmetal
  default: anthropic-claude-sonnet-5

The provider is defined as fastmetal under providers:, but model.provider selects it as custom:fastmetal. Write plain fastmetal there and Hermes won't pick it up.

Put the key in ~/.hermes/.env:

# ~/.hermes/.env
FASTMETAL_API_KEY=your-fastmetal-api-key

Run hermes for the CLI or hermes --tui for the terminal UI.

3. Switch models mid-session

With a named provider, /model swaps models without leaving the session:

/model custom:fastmetal:glm-5.2
/model custom:fastmetal:deepseek-v4-flash
/model custom:fastmetal:anthropic-claude-opus-5

This is where pay-as-you-go earns its keep. Run routine edits on a cheap model and step up to a frontier model only for design decisions and nasty debugging. On a subscription, the money you save by going cheap never comes back to you; here it comes straight off the bill.

Background work like title generation and history compression should be pinned to a light model:

auxiliary:
  title_generation:
    provider: fastmetal
    model: gemini-3.5-flash
  compression:
    provider: fastmetal
    model: gemini-3.5-flash

How the costs compare

Codex comes bundled with ChatGPT's monthly plans; the price and usage allowance of each plan are on OpenAI's pricing page. You pay the same every month whether you use it or not, and inside the allowance there's nothing extra to pay.

On FastMetal you top up a prepaid balance and each request deducts the tokens it actually used. Agents resend the conversation history on every turn, so most of the bill is input tokens, and the same work can cost ten times more or less depending on the model you pick. To see what your own usage would cost, enter your daily token volume in the cost calculator and it prices it per model. Per-token prices are on the pricing page.

Which one is cheaper

Honestly: if you run a frontier model full-time every day, a subscription can come out cheaper. Top-tier models are expensive per token, agents send a lot of input, and daily heavy use adds up past a flat monthly fee quickly.

Pay-as-you-go clearly wins when:

  • You don't code with an agent every day. Two or three days a week, or only when a project is on. A subscription charges in full for the months you barely touch it; pay-as-you-go charges nothing.
  • A light model handles most of the work. Built around something like deepseek-v4-flash, the bill is a fraction of what a top model costs, often a tenth or less.
  • You want a hard spending cap. FastMetal is prepaid, so you can't be billed beyond what you've loaded. If an agent gets stuck in a loop, the damage stops at your balance.
  • You keep hitting usage windows. Subscription plans meter usage over 5-hour or weekly windows, and an intense day can run into the limit. Pay-as-you-go keeps going as long as there's balance.
  • You don't want to be locked to one model. Hermes is model-agnostic. One key switches between Claude, GLM, DeepSeek and Qwen.

If you run a frontier model eight hours a day, every day, a flat subscription is easier to budget. Otherwise, load a small amount and measure your real spend over a week or two. Balance and usage are always on the dashboard.

Common problems

  • Authentication errors. Check that the variable named in key_env exists in ~/.hermes/.env.
  • Model id typos. Use the ids exactly as listed on /models. They're hyphenated, like anthropic-claude-sonnet-5.
  • Empty balance. Requests are refused once the balance runs out. If an error doesn't make sense, check the balance first.

Next steps

The full configuration reference, including the Anthropic-compatible transport and context-length overrides, is in the Hermes setup guide. Hermes is also an MCP client: connect FastMetal's MCP server and it can consult other models or generate images as tools while keeping its main model.

Try the latest AI models right now

the latest AI models is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.