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 Qwen3.8-27B with flat-rate paid inference.
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.
Paid inference
Choose a paid plan to validate the provider with inference requests.
Quick setup
Create an account, choose a paid plan, copy your yolo_... API key, set your base URL to https://yolo-auto.com/v1, and select qwen3.8-27b for paid inference. See the models page for details.
Best next pages
Docs · Pricing · Qwen3.8-27B API · LLM API access · Flat-rate 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 Qwen3.8-27B 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.
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.
- Developers adding a custom OpenCode model provider.
- Coding-agent users who want flat-rate paid inference.
- OpenCode workflows that benefit from predictable flat-rate LLM pricing.
Keep OpenCode, change the model provider
OpenCode supports custom providers through an OpenAI-compatible adapter. Yolo-Auto supplies the endpoint, API key, and public Qwen3.8-27B model while OpenCode keeps handling the coding-agent workflow.
Free-tier requests are temporarily disabled. Paid plans offer API inference now. If longer coding sessions make token volume difficult to predict, the same provider config works with a flat-rate paid plan.
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 default Yolo-Auto model.
These examples use Qwen3.8-27B with model ID qwen3.8-27b for text, images, and tools on paid plans. Paid users can optionally choose yolo, a configurable route currently backed by Qwen3.8-27B. Its server-side target can change while your client model ID stays the same.
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",
"limit": {
"context": 131072,
"output": 32768
},
"attachment": true,
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
}
}
}
}
}
}Do not commit the API key. OpenCode reads it from YOLO_AUTO_API_KEY.
When to choose Yolo-Auto
You need OpenAI-compatible LLM access, predictable cost, no prompt retention. Your prompts and responses are not used for model training.
You need image generation, every model under the sun, a managed IDE, or a consumer-only chatbot with no API workflow.
Read the docs, check models, compare pricing, or review the privacy policy.
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.
Related LLM API guides
OpenClaw LLM API setup with Yolo-Auto paid inference. Copy the models.json provider config and select Qwen3.8-27B.
Cline OpenAI-Compatible API SetupConfigure Cline with Yolo-Auto's OpenAI-compatible API. Copy the base URL, API key, model ID, and context-window settings.
Pi Coding Agent API SetupPi coding agent API setup with Yolo-Auto. Copy the provider config, add your API key, select Qwen3.8-27B, and use flat-rate LLM access.
LLM API for Coding AgentsLLM API for coding agents. Yolo-Auto offers OpenAI-compatible chat completions, flat-rate pricing, no prompt or response retention.
Chat Completions APIChat completions API from Yolo-Auto. OpenAI-compatible endpoint for apps, agents, SDKs, and desktop clients with flat-rate paid pricing.