Skip to documentation
DEVELOPER DOCS / HASHBIDXMODEL ACCESS. ONE INTEGRATION.

TOOL INTEGRATION

OpenCode

An open-source AI coding agent with a terminal UI. Add HashBid as a custom provider in its config file.

Official docs

Before you start

API Key
<YOUR_API_KEY>

Create one on the API Keys page. Paste the raw key, without Bearer.

Base URL
https://hashbidx.ai/v1

Must include /v1.

Model
gpt-5

Example only — use a model ID from the Models page.

Setup

01Install OpenCode

The install script is recommended on macOS / Linux, npm on Windows.

macOS / Linux
curl -fsSL https://opencode.ai/install | bash
npm
npm install -g opencode-ai
Check the install
opencode --version

02Add HashBid as a provider

Create ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json). List each model you want to use under models, using the IDs from the Models page. {env:…} makes OpenCode read the key from an environment variable.

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "hashbid": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "HashBid",
      "options": {
        "baseURL": "https://hashbidx.ai/v1",
        "apiKey": "{env:HASHBID_API_KEY}"
      },
      "models": {
        "<MODEL_ID>": { "name": "<MODEL_ID>" }
      }
    }
  }
}

03Set the API key and start

Then open OpenCode in a project directory.

macOS / Linux
export HASHBID_API_KEY="<YOUR_API_KEY>"
opencode
Windows (PowerShell)
$env:HASHBID_API_KEY="<YOUR_API_KEY>"
opencode

Verify it works

  • Type /models and pick a model under HashBid.
  • Ask Write a bubble sort in Python and watch the answer stream back.
  • The request shows up on the Logs page of this console.

FAQ

Authentication failed / Invalid API key

Make sure HASHBID_API_KEY is set in the terminal that launched OpenCode, with no extra spaces.

The config must be valid JSON — straight quotes, no trailing commas.

Fetch failed / connection timed out

baseURL must end with /v1.

Model not found

The key under models is sent as-is, so it must match a model ID on the Models page exactly.

All developer tools
BUILD WITH HASHBIDX

Find your model. Make your first call.

Models & pricing