Migrating from OpenRouter to FastMetal: base URL, key and model ids
The short version
- FastMetal and OpenRouter both speak the OpenAI Chat Completions format, so the SDK, the request body and the response parsing stay as they are.
- Three values change: the base URL becomes
https://api.fastmetal.ai/v1, the key becomes a FastMetal key, and each model id loses its slash. - The model id is the only part that takes care. The rule is not fully mechanical, so check each id against
/v1/models. - Claude Code connects through FastMetal's Anthropic-compatible endpoint with four environment variables.
What changes
| OpenRouter (as of August 2026) | FastMetal | |
|---|---|---|
| Base URL | https://openrouter.ai/api/v1 | https://api.fastmetal.ai/v1 |
| API key | Issued by OpenRouter | Issued in your FastMetal dashboard |
| Model id | anthropic/claude-opus-5 | anthropic-claude-opus-5 |
| Request format | Chat Completions | Same |
| Response format | Chat Completions | Same |
messages, max_tokens, temperature, stream and tools behave the same way. Code written against the Chat Completions format runs unchanged apart from those three values.
Step 1: get a FastMetal key
Create an account and issue an API key. Keys start with sk- (sk-usd- on a dollar account) and are shown once. Credit is prepaid by card with a $5 minimum top-up. Free models such as gemini-flash-lite-free cost $0 and run without a top-up, so you can test the migration before loading credit.
export FASTMETAL_API_KEY="sk-..."
Step 2: point the client at FastMetal
Python (OpenAI SDK)
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FASTMETAL_API_KEY"],
base_url="https://api.fastmetal.ai/v1",
)
resp = client.chat.completions.create(
model="anthropic-claude-opus-5", # was "anthropic/claude-opus-5"
max_tokens=500,
messages=[
{"role": "user", "content": "Write one sentence confirming the migration worked."},
],
)
print(resp.choices[0].message.content)
print(resp.usage)
The diff against an OpenRouter client is the api_key variable, the base_url and the model string.
curl
curl https://api.fastmetal.ai/v1/chat/completions \
-H "Authorization: Bearer $FASTMETAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"max_tokens": 200,
"messages": [
{"role": "user", "content": "Hello"}
]
}'
TypeScript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.FASTMETAL_API_KEY,
baseURL: 'https://api.fastmetal.ai/v1',
});
const resp = await client.chat.completions.create({
model: 'deepseek-v4-pro',
max_tokens: 500,
messages: [{ role: 'user', content: 'Hello' }],
});
console.log(resp.choices[0].message.content);
Step 3: map the model ids
OpenRouter ids take the form vendor/model. FastMetal ids have no slash.
| OpenRouter (as of August 2026) | FastMetal |
|---|---|
anthropic/claude-opus-5 | anthropic-claude-opus-5 |
anthropic/claude-sonnet-5 | anthropic-claude-sonnet-5 |
anthropic/claude-fable-5 | anthropic-claude-fable-5 |
anthropic/claude-haiku-4.5 | anthropic-claude-haiku-4-5 |
openai/gpt-5.6-sol | gpt-5.6-sol |
openai/gpt-5.6-luna | gpt-5.6-luna |
google/gemini-3.5-flash | gemini-3.5-flash |
x-ai/grok-4.5 | grok-4.5 |
deepseek/deepseek-v4-pro | deepseek-v4-pro |
deepseek/deepseek-v4-flash | deepseek-v4-flash |
z-ai/glm-5.2 | glm-5.2 |
moonshotai/kimi-k3 | kimi-k3 |
minimax/minimax-m3 | minimax-m3 |
qwen/qwen3.8-max | qwen3.8-max |
Most ids just drop the vendor prefix. Anthropic models are the exception: they keep anthropic- and their dots become hyphens (claude-haiku-4.5 becomes anthropic-claude-haiku-4-5). GPT, GLM and the rest keep their dots (gpt-5.6-sol, glm-5.2).
Don't guess. Look the model up in the catalog, or list every id your key can call:
curl https://api.fastmetal.ai/v1/models \
-H "Authorization: Bearer $FASTMETAL_API_KEY"
Catalog page URLs swap dots for hyphens, so the end of a /models/... URL is not the model id. The list from /v1/models is.
Step 4: repoint your tools
Claude Code
FastMetal also has an Anthropic-compatible endpoint, so Claude Code needs only environment variables:
export ANTHROPIC_AUTH_TOKEN="$FASTMETAL_API_KEY"
export ANTHROPIC_BASE_URL="https://api.fastmetal.ai"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="anthropic-claude-haiku-4-5"
export ANTHROPIC_MODEL="anthropic-claude-sonnet-5" # optional
Always set ANTHROPIC_DEFAULT_HAIKU_MODEL. Claude Code runs background tasks on its built-in Haiku model id, which is not a FastMetal model name, so those calls are refused until the variable names one that is. The key goes in ANTHROPIC_AUTH_TOKEN, and the base URL takes no /v1. The Claude Code setup post explains both and covers running Claude Code on GLM, DeepSeek or Kimi.
Other OpenAI-compatible tools
Cline, Roo Code, Continue and any tool with an OpenAI-compatible provider setting need the same two fields changed: the base URL (https://api.fastmetal.ai/v1) and the key. The setting may be labeled Base URL, API Base or Custom endpoint depending on the tool. Per-tool steps are in the guides.
Gotchas
Slashes in model ids
A request for anthropic/claude-opus-5 fails because no model has that id on FastMetal. Map it with the table above or check /v1/models.
There is no :free suffix
OpenRouter marks free variants with a :free suffix. On FastMetal a free model is its own id, gemini-flash-lite-free. Adding :free to another id does not work. Free models are shared and rate-limited, and Google may use what you send to the free tier for training: the model's page in the catalog shows how each model handles your data, so read it before sending anything sensitive.
Running out of credit
Credit is prepaid. When the balance is used up, requests are refused and the error body contains budget_exceeded. Match on that marker rather than the status code, since rate limits can share the same code. You also get an email when the balance runs low and when it runs out.
OpenRouter-only parameters
OpenRouter's provider routing object and its optional HTTP-Referer and X-Title headers have no use on FastMetal. The headers are harmless if you leave them in; remove the provider object.
Billing in dollars
Token counts in usage are reported the same way, and a dollar account is billed in US dollars per million tokens. Per-model rates are on the pricing page, and the cost calculator estimates a workload.
Check the migration
curl -s https://api.fastmetal.ai/v1/models \
-H "Authorization: Bearer $FASTMETAL_API_KEY" | head -40
A model list back means the key and base URL are right. Send one real request; when it returns usage, you are done. The request shows up on the usage page right away.
FAQ
How much code do I have to change?
With the OpenAI SDK, the base URL, the key and the model id. If you used OpenRouter-specific parameters such as the provider object, remove those too.
What about a model FastMetal doesn't offer?
A model that is not in the catalog can't be called through FastMetal.
Does the response format change?
No. Responses follow the Chat Completions format, with choices, finish_reason and usage where your code already reads them.
Start the migration
Create a free account, issue a key, and run the Python example above against gemini-flash-lite-free before loading any credit. Rates per million tokens are on the pricing page.