PixMind Docs
Agent Integrations

Use PixMind with OpenCode

Configure a PixMind provider, store the API key in OpenCode credentials, and select a GPT-5.6 model.

OpenCode supports custom OpenAI-compatible providers. Keep the PixMind provider configuration separate from the API key: the config describes the endpoint and models, while opencode auth login stores the credential.

1. Install OpenCode

Follow the official OpenCode documentation, then verify the command:

opencode --version

2. Create a PixMind API key

Create a key in the API Platform key dashboard. Do not put the real key in opencode.json.

3. Configure the PixMind provider

Create opencode.json in the project root, or use the OpenCode user configuration directory for a global setup.

{
  "$schema": "https://opencode.ai/config.json",
  "model": "pixmind/gpt-5.6-terra",
  "provider": {
    "pixmind": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "PixMind",
      "options": {
        "baseURL": "https://aihub-admin.aimix.pro/api-platform/v1"
      },
      "models": {
        "claude-fable-5": { "name": "Claude Fable 5" },
        "claude-opus-5": { "name": "Claude Opus 5" },
        "claude-sonnet-5": { "name": "Claude Sonnet 5" },
        "claude-opus-4-8": { "name": "Claude Opus 4.8" },
        "claude-opus-4-8-cc": { "name": "Claude Opus 4.8 CC" },
        "gpt-5.6-sol": {
          "name": "GPT-5.6 Sol",
          "reasoning": true,
          "variants": {
            "low": { "reasoningEffort": "low" },
            "medium": { "reasoningEffort": "medium" },
            "high": { "reasoningEffort": "high" },
            "xhigh": { "reasoningEffort": "xhigh" },
            "max": { "reasoningEffort": "max" },
            "ultra": { "reasoningEffort": "ultra" }
          }
        },
        "gpt-5.6-terra": {
          "name": "GPT-5.6 Terra",
          "reasoning": true,
          "variants": {
            "low": { "reasoningEffort": "low" },
            "medium": { "reasoningEffort": "medium" },
            "high": { "reasoningEffort": "high" },
            "xhigh": { "reasoningEffort": "xhigh" },
            "max": { "reasoningEffort": "max" },
            "ultra": { "reasoningEffort": "ultra" }
          }
        },
        "gpt-5.6-luna": {
          "name": "GPT-5.6 Luna",
          "reasoning": true,
          "variants": {
            "low": { "reasoningEffort": "low" },
            "medium": { "reasoningEffort": "medium" },
            "high": { "reasoningEffort": "high" },
            "xhigh": { "reasoningEffort": "xhigh" },
            "max": { "reasoningEffort": "max" }
          }
        },
        "gemini-3.1-pro-preview": { "name": "Gemini 3.1 Pro Preview" },
        "gemini-3.5-flash": { "name": "Gemini 3.5 Flash" },
        "gemini-3.6-flash": { "name": "Gemini 3.6 Flash" },
        "gemini-3.7-flash": { "name": "Gemini 3.7 Flash" },
        "gemini-3.5-flash-lite": { "name": "Gemini 3.5 Flash-Lite" }
      }
    }
  }
}

4. Authenticate the provider

opencode auth login -p pixmind

Paste the PixMind API key when prompted. Never write a key as {env:sk_...}: the value inside the braces must be an environment variable name, not the secret itself.

5. Select a model and verify

Start OpenCode, run /models, choose pixmind/gpt-5.6-terra, and send a minimal prompt such as “Reply with OK only.”

The reasoning and variants entries above make OpenCode show the reasoning-depth control next to GPT models. Sol and Terra support up to ultra; Luna supports up to max.

If the model appears but the request reports a missing API key, run opencode auth login -p pixmind again and verify that the provider ID exactly matches pixmind.

Model recommendations

  • Daily coding: pixmind/claude-sonnet-5 or pixmind/gpt-5.6-terra
  • Complex planning: pixmind/claude-opus-5 or pixmind/gpt-5.6-sol
  • Multimodal work: pixmind/gemini-3.6-flash
  • Low-latency work: pixmind/gpt-5.6-luna or pixmind/gemini-3.5-flash-lite

On this page