OpenCode integration

Use OpenCode with Yolo-Auto's LLM API.

Add Yolo-Auto as an OpenAI-compatible provider in OpenCode, keep the API key in an environment variable, and run Qwen with free or flat-rate access.

Get a free OpenCode API key → Open full agent docs

Copyable config

Add one OpenAI-compatible provider block to opencode.json.

Environment-based key

Keep the Yolo-Auto API key out of the committed config file.

Free to test

Validate the provider before choosing a flat-rate paid plan.

Quick setup

Create an account, copy your yolo_... API key, set your base URL to https://yolo-auto.com/v1, and use a public model from the models page.

Best next pages

Docs · Pricing · Models · Free AI chat · Cheap LLM API

Connect OpenCode to Yolo-Auto

Create a Yolo-Auto key, export it as YOLO_AUTO_API_KEY, and add the provider configuration below to opencode.json. Select the Yolo-Auto Qwen model in OpenCode after the provider loads.

Why use a custom OpenCode provider

OpenCode can use OpenAI-compatible providers, so you can keep the coding-agent workflow while changing the model endpoint and pricing model.

OpenCode YOLO mode is a different feature

OpenCode permission modes sometimes use the word YOLO. That behavior is unrelated to Yolo-Auto. This guide configures Yolo-Auto as the model provider.

Use cases

Who OpenCode LLM API Setup is actually for

OpenCode LLM API Setup is best for developers and power users who want model access inside tools, agents, scripts, and apps, not just a closed consumer chatbot tab.

Positioning

Keep OpenCode, change the model provider

OpenCode supports custom providers through an OpenAI-compatible adapter. Yolo-Auto supplies the endpoint, API key, and public Qwen model while OpenCode keeps handling the coding-agent workflow.

The integration starts on the free tier. If longer coding sessions make token volume difficult to predict, the same provider config works with a flat-rate paid plan.

OpenCode configuration

Add Yolo-Auto to opencode.json

Set the API key in your environment, then add the provider block below. The config uses OpenCode's OpenAI-compatible provider package and the current public Yolo-Auto model.

1. Set the API key

export YOLO_AUTO_API_KEY="yolo_YOUR_KEY"

2. Add the provider

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "yolo-auto": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Yolo-Auto",
      "options": {
        "baseURL": "https://yolo-auto.com/v1",
        "apiKey": "{env:YOLO_AUTO_API_KEY}"
      },
      "models": {
        "qwen3.8-27b": {
          "name": "Qwen3.8 27B"
        }
      }
    }
  }
}

Do not commit the API key. OpenCode reads it from YOLO_AUTO_API_KEY.

Decision checklist

When to choose Yolo-Auto

Choose it when

You need OpenAI-compatible LLM access, predictable cost, free testing, and no prompt or response storage.

Skip it when

You need image generation, every model under the sun, a managed IDE, or a consumer-only chatbot with no API workflow.

Next step

Read the docs, check models, compare pricing, or review the privacy policy.

FAQ

OpenCode LLM API Setup FAQ

Does OpenCode support Yolo-Auto?

Yes. Configure Yolo-Auto through OpenCode's OpenAI-compatible provider package and use the Yolo-Auto base URL and model ID.

Where should the API key go?

Set YOLO_AUTO_API_KEY in your environment and reference it from opencode.json instead of committing the secret.

Is this the same as enabling YOLO mode in OpenCode?

No. OpenCode permission behavior and Yolo-Auto's LLM API are separate features.

Explore more

Related LLM API guides