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.
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.
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 free testing before choosing a paid backend.
- 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 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.
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.
When to choose Yolo-Auto
You need OpenAI-compatible LLM access, predictable cost, free testing, and no prompt or response storage.
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 a free Yolo-Auto API key. Copy the models.json provider config, select Qwen, and upgrade to flat-rate access.
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 a free API key, select Qwen, 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, free testing, and no saved prompt history.
AI Agent APIAI agent API for developers. Yolo-Auto provides OpenAI-compatible chat completions, free testing, flat-rate pricing without per-token billing, and no saved prompt history.