hpc-ai logo
hpc-ai logo
Cloud GPUs
Model APIs
Pricing
Docs
Resources
Company

Integrating OpenCode with HPC-AI Tech

In the rapidly evolving landscape of AI agents and developer tooling, OpenCode is emerging as a powerful framework for building flexible, code-driven AI workflows. But like any framework, its true potential depends on the models behind it.

Today, we’ll walk you through how to integrate OpenCode with the HPC-AI Tech Model APIs platform. By the end of this guide, you’ll be able to leverage high-performance models like Minimax-M2.5 directly inside your OpenCode environment.

cover

🚀 Prerequisites

Before we dive in, make sure you have:

  1. OpenCode installed and set up

  2. An HPC-AI Tech API Key (from the Model APIs platform)

🛠️ Configuration: Choose Your Method

OpenCode offers multiple ways to configure providers depending on your workflow. Pick what suits you best.

Method 1: Interactive Configuration (Recommended)

Best for developers who prefer a guided, in-app setup.

  1. Enter your project directory

  2. Start OpenCode

  3. Run the command:

  4. /connect

  5. Select provider type:

    • Choose “Other” or “Custom Provider”

    • Or search for the provider name directly

  6. Enter the following:

    • Base URL: https://api.hpc-ai.com/inference/v1

    • API Key: your-hpc-ai-api-key

  7. Select the model:

    • minimax/minimax-m2.5

Method 2: Config File (The Structured Way)

Best for reproducibility, automation, or team environments.

Step 1: Create Config

Create or edit the config file at:

~/.config/opencode/config.json

Add the following:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "hpc-ai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "HPC-AI Tech",
      "options": {
        "baseURL": "https://api.hpc-ai.com/inference/v1",
        "apiKey": "{env:HPC_AI_API_KEY}"
      },
      "models": {
        "minimax/minimax-m2.5": {
          "name": "HPC-AI Tech"
        }
      }
    }
  },
  "model": "minimax/minimax-m2.5"
}

Step 2: Add API Key

Create or edit:

~/.local/share/opencode/auth.json

{
  "hpc-ai": {
    "type": "api",
    "key": "sk-your-hpc-ai-api-key"
  }
}

Config Priority (Important)

OpenCode resolves configs in the following order:

Method 3: Environmental Variables (The Lightweight Way)

Best for quick setups or CI/CD pipelines.

export HPC_AI_API_KEY="sk-your-hpc-ai-api-key"
export OPENAI_API_BASE="https://api.hpc-ai.com/inference/v1"

✅ Verifying the Connection

After configuration, it’s important to confirm everything is working correctly.

  1. Restart OpenCode (if required)

  2. Run a test query or agent workflow

  3. Ensure responses are returned successfully from the model

A successful response confirms:

  • Your API key is valid

  • The endpoint is reachable

  • The model is correctly configured

🎯 Summary

By integrating OpenCode with HPC-AI Tech, you unlock:

  • Massive context windows

  • Cost-efficient inference

  • Seamless compatibility with OpenAI-style APIs

Whether you're building developer tools, autonomous agents, or production workflows, this setup gives you the performance and flexibility needed to scale.

Happy coding!

hpc-ai logo

HPC AI TECHNOLOGY PTE. LTD.

1 MARITIME SQUARE HARBOURFRONT

CENTRE #11-18, Singapore

Products

  • Cloud GPUs
  • Model APIs New
  • Fine-Tuning
  • Reserved Cluster

Models

  • MiniMax M2.5
  • Kimi K2.5

Pricing

  • Cloud GPUs
  • Model APIs
  • Fine-Tuning

Featured GPUs

  • B200 SXM6
  • H200 SXM5
  • B300 SXM6

Developers

  • Docs
  • API Service
  • Quick Start

Resources

  • Blog
  • Customer
  • Partner Program
  • Hosting

Company

  • About Us
  • Contact Us
  • Newsroom
  • Research Papers

Legal

  • Privacy Policy
  • Terms of Service
FacebookXGitHubMediumLinkedinSlack

Copyright © 2026, HPC AI TECHNOLOGY PTE. LTD.