Skip to main content
VOID

ToolsOpenCode

OpenCode

Connect Void API models through an OpenAI-compatible provider.

opencode.aiOfficial setup docs

MODEL_ID is a placeholder. Choose a model from the catalog that supports this tool's endpoint and features.

  1. API key

    Store your key in an environment variable.

    export VOID_API_KEY='void_your_key'

    Run in Bash or Zsh. Sets the values for this terminal only. To keep them for future sessions, also add these commands to ~/.bashrc or ~/.zshrc.

  2. Configuration

    Create opencode.json in your project root.

    opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "void-api": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "Void API",
          "options": {
            "baseURL": "https://void-api.tech/v1",
            "apiKey": "{env:VOID_API_KEY}"
          },
          "models": {
            "MODEL_ID": {
              "name": "MODEL_ID",
              "attachment": true,
              "modalities": {
                "input": [
                  "text",
                  "image"
                ],
                "output": [
                  "text"
                ]
              }
            }
          }
        }
      }
    }
  3. Run

    Start OpenCode and select a Void API model.

    shell
    opencode
    /models

Create a key in your account; model IDs are in the catalog.