LLM API

OpenCode

Open-source AI coding agent built for the terminal. Connect it to ARZASTORE AI through any OpenAI-compatible endpoint.

OpenAI-Compatible

About OpenCode

OpenCode is an open-source AI coding agent with a polished terminal UI, multi-session management and LSP integration - often described as the open-source alternative to Claude Code.

Fully open source, available as a TUI, desktop app or IDE extension.

Sleek terminal interface with model picker and multi-session support.

Works with any provider through an OpenAI-compatible base URL.

Built-in Language Server Protocol support for smarter edits.

Installation

curl -fsSL https://opencode.ai/install | bash
brew install sst/tap/opencode
npm install -g opencode-ai

Verify the installation:

opencode --version

Configuration

Method 1 - Environment variables (quickest)

OpenCode supports OpenAI-compatible mode with just two variables. Set them in your shell profile:

# ~/.zshrc hoặc ~/.bashrc
export OPENAI_BASE_URL="https://api.arzastore.com/v1"
export OPENAI_API_KEY="sk-your-api-key"
# Reload shell
source ~/.zshrc

Method 2 - Config file (custom provider)

For a named provider and an explicit model list, add a custom provider to your OpenCode config:

{
 "$schema": "https://opencode.ai/config.json",
 "provider": {
 "arzastore": {
 "npm": "@ai-sdk/openai-compatible",
 "name": "ARZASTORE AI",
 "options": {
 "baseURL": "https://api.arzastore.com/v1",
 "apiKey": "{env:OPENAI_API_KEY}"
 },
 "models": {
 "claude-sonnet-4-20250514": { "name": "Claude Sonnet (ARZASTORE AI)" },
 "gpt-4o": { "name": "GPT-4o (ARZASTORE AI)" }
 }
 }
 }
}

Model IDs

Usage

Chọn model

Launch OpenCode and open the model picker to select a ARZASTORE AI model:

opencode
# Trong TUI gõ /models để mở model picker

Non-interactive

Run a one-off task without entering the TUI:

opencode run "Refactor hàm này cho gọn hơn"

Tips

  • •Use env vars first: they take precedence over the config file and are the fastest way to get started.
  • •Restart after editing: OpenCode may not pick up provider changes until it restarts.
  • •Windows: use WSL for the best performance and full feature compatibility.

Need more help?

Our support team is ready to assist you

$

Prices are shown in USD

Picked from your location (Chile). You can change it anytime from the language button in the top bar, or pick one below.