# Through a gateway A gateway that serves GPT through the Responses API and Claude through the Messages API with one key (for example [LiteLLM](https://docs.litellm.ai/)) is set once in `~/.freehand/config.json`: ```json {"gateway": {"api_base": "http://127.0.0.1:4000/v1", "api_key_env": "GATEWAY_API_KEY"}, "model": "gw-gpt-6-astra", "reasoning_effort": "high"} ``` `/model` then lists every model the gateway serves, and the model's name picks the API: a name containing `claude-` goes to the Messages API at the base without `/v1` (or `gateway.anthropic_api_base`), a name containing `gemini-` to Chat Completions at the base (some gateways serve Gemini only there), anything else to Responses. Switching between the two in a running session converts `transcript.json` to the other format and tells the model. Earlier reasoning is left out, because it only verifies for the model that wrote it. A gateway prefix such as `gw-` is ignored when looking up built-in prices and context windows. ## Pinning an account `"accounts": {"gw-": "team-a"}` in `gateway` sends every `gw-` model to that one account behind the gateway, using LiteLLM's deployment names: `gw-gpt-6-astra` goes out as `gw/gpt-6-astra@team-a`. This keeps the prompt cache on one account instead of a random one per request. The session still shows and prices the model under its own name; other models are not affected.