Hashference
Hosted AI inference via Streamable HTTP MCP. OAuth or Bearer API key required; chat uses prepaid workspace balance. Docs: https://hashference.com/docs/connect
Hosted MCP Server
npx add-mcp 'https://hashference.com/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Connect your tool
Exact settings for the coding agents and apps people use with Hashference. Replace hf_... with your API key, and <model-id> with any ID from GET /v1/models.
Claude Code
Start it in one line:
Shell
ANTHROPIC_BASE_URL="https://hashference.com" ANTHROPIC_AUTH_TOKEN="hf_..." ANTHROPIC_API_KEY="" MAX_THINKING_TOKENS=0 ANTHROPIC_MODEL="<model-id>" ANTHROPIC_DEFAULT_HAIKU_MODEL="<model-id>" CLAUDE_CODE_SUBAGENT_MODEL="<model-id>" claude
To keep it set up:
Point Claude Code at Hashference with a few environment variables. This uses a low-cost open model for the main session, quick tasks and subagents. Anthropic compatibility does not imply the model is Claude.
Shell
export ANTHROPIC_BASE_URL="https://hashference.com"
export ANTHROPIC_AUTH_TOKEN="hf_..."
export ANTHROPIC_API_KEY=""
export MAX_THINKING_TOKENS=0
export ANTHROPIC_MODEL="<model-id>"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="<model-id>"
export CLAUDE_CODE_SUBAGENT_MODEL="<model-id>"
claude
ANTHROPIC_API_KEY must be empty, or Claude Code uses it instead. If you signed in to Claude Code before, run /logout first, then check /status. To keep the setup, put the same variables in the env block of ~/.claude/settings.json. For Claude itself, set ANTHROPIC_MODEL to a Claude Messages ID from the catalog and remove MAX_THINKING_TOKENS; a Claude request reserves up to about $1 of balance while it runs.
Cursor
In Cursor Settings, open Models. Under API Keys, paste your key as the OpenAI API key, turn on Override OpenAI Base URL, then add the model by name.
Settings
OpenAI API Key hf_...
Override Base URL https://hashference.com/v1
Custom model <model-id>
Cursor calls the API from its own servers, so it needs this public HTTPS address rather than a local one.
VS Code
Install Claude Code for VS Code · Install Cline
Install the Claude Code extension or Cline, then give it these settings. The Claude Code extension reads ~/.claude/settings.json; Cline takes the fields in its settings panel.
~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://hashference.com",
"ANTHROPIC_AUTH_TOKEN": "hf_...",
"ANTHROPIC_API_KEY": "",
"MAX_THINKING_TOKENS": "0",
"ANTHROPIC_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "<model-id>",
"CLAUDE_CODE_SUBAGENT_MODEL": "<model-id>"
}
}
Cline settings
API Provider OpenAI Compatible
Base URL https://hashference.com/v1
API Key hf_...
Model ID <model-id>
The install buttons open VS Code on the extension’s page. If you already have a settings.json, merge the env block into it. Roo Code and Kilo Code take the same fields as Cline.
Codex
Add Hashference as a model provider in ~/.codex/config.toml. Codex reads the key from the variable you name.
config.toml
model = "<model-id>"
model_provider = "quai"
[model_providers.quai]
name = "Hashference"
base_url = "https://hashference.com/v1"
env_key = "HASHFERENCE_API_KEY"
wire_api = "responses"
Shell
export HASHFERENCE_API_KEY="hf_..."
codex
Any model ID from GET /v1/models works as model.
OpenCode
Add a provider to opencode.json (in your project, or ~/.config/opencode/ for every project). The key stays in an environment variable.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"quai": {
"npm": "@ai-sdk/openai-compatible",
"name": "Hashference",
"options": {
"baseURL": "https://hashference.com/v1",
"apiKey": "{env:HASHFERENCE_API_KEY}"
},
"models": {
"<model-id>": {
"name": "<model-id>"
}
}
}
},
"model": "quai/<model-id>"
}
Shell
export HASHFERENCE_API_KEY="hf_..."
opencode
Add more models under models with any ID from GET /v1/models, then pick them with /models.
Cline, Roo Code, Kilo Code
In the extension’s settings, choose OpenAI Compatible as the API provider and fill in these fields.
Settings
API Provider OpenAI Compatible
Base URL https://hashference.com/v1
API Key hf_...
Model ID <model-id>
The same fields work in Roo Code and Kilo Code.
Hermes Agent
Run hermes model and choose Custom endpoint, or set the model block in ~/.hermes/config.yaml and keep the key in ~/.hermes/.env.
config.yaml
model:
provider: custom
base_url: https://hashference.com/v1
default: <model-id>
key_env: HASHFERENCE_API_KEY
context_length: 65536
max_tokens: 8192
.env
HASHFERENCE_API_KEY=hf_...
Keep context_length and max_tokens as shown: Hermes otherwise assumes a larger context and output than the hosted model takes, and compresses too late. Requests over a model’s output limit are lowered to it. Run hermes doctor to check the connection.
OpenClaw
Merge this into ~/.openclaw/openclaw.json. The provider defines the model, and the agents entry allows it.
openclaw.json
{
"models": {
"mode": "merge",
"providers": {
"quai": {
"baseUrl": "https://hashference.com/v1",
"apiKey": "hf_...",
"api": "openai-completions",
"models": [
{
"id": "<model-id>",
"name": "<model-id>",
"input": [
"text"
]
}
]
}
}
},
"agents": {
"defaults": {
"models": {
"quai/<model-id>": {
"alias": "quai"
}
}
}
}
}
Switch to it with /model quai, then check /status.
MCP server
Give any MCP-capable agent Hashference as tools: list models, check your balance, ask a model, and set up top-ups. Apps that support MCP sign-in (Claude, ChatGPT, Cursor, VS Code, Claude Code) need only the URL: you sign in, approve, and the app gets its own key. Others connect with your API key.
Claude or ChatGPT
Add a custom connector with this URL, then sign in and approve:
https://hashference.com/mcp
Claude: Settings > Connectors > Add custom connector.
ChatGPT: turn on developer mode in Settings, then add a connector with this URL.
Claude Code
claude mcp add --transport http hashference https://hashference.com/mcp \
--header "Authorization: Bearer hf_..."
# Or sign in instead of pasting a key: leave out --header, then run /mcp in Claude Code.
Codex
# ~/.codex/config.toml
[mcp_servers.hashference]
url = "https://hashference.com/mcp"
bearer_token_env_var = "HASHFERENCE_API_KEY"
Cursor
{
"mcpServers": {
"hashference": {
"url": "https://hashference.com/mcp",
"headers": {
"Authorization": "Bearer hf_..."
}
}
}
}
The chat tool spends from your workspace balance, like any other request with this key. To run it locally instead, with a work-paid x402 tool, install the CLI (npm i -g https://hashference.com/hashference-0.1.4.tgz) and use: claude mcp add hashference -- hashference mcp
Any OpenAI-compatible app
Start it in one line:
Shell
export OPENAI_BASE_URL="https://hashference.com/v1" OPENAI_API_KEY="hf_..."
To keep it set up:
Most apps and SDKs read these two variables. Anthropic SDKs use ANTHROPIC_BASE_URL set to the origin instead.
Shell
export OPENAI_BASE_URL="https://hashference.com/v1"
export OPENAI_API_KEY="hf_..."
Use any ID from GET /v1/models as the model.