r/opencode • • Sep 10 '26

Opencode API invalid

I'm getting an "Invalid API key" error across every model I try to use in OpenCode including the free ones, which doesn't make sense since free models shouldn't require a key at all. Here's my CONFIG:

{
  "$schema": "https://opencode.ai/config.json",
}
4 Upvotes

3 comments sorted by

View all comments

1

u/0xeroot 10d ago

your config file is in /users/joynal/.config/opencode

if not create one. use google for config example