Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,16 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
},
},
}),
anyapi: () =>
Effect.succeed({
autoload: false,
options: {
headers: {
"HTTP-Referer": "https://opencode.ai/",
"X-Title": "opencode",
},
},
}),
gitlab: Effect.fnUntraced(function* (input: Info) {
const {
VERSION: GITLAB_PROVIDER_VERSION,
Expand Down
38 changes: 38 additions & 0 deletions packages/web/src/content/docs/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,44 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te

---

### AnyAPI

[AnyAPI](https://anyapi.ai) is a unified AI platform providing access to 400+ models from OpenAI, Anthropic, Google, Meta, DeepSeek and more through a single OpenAI-compatible API. Models are listed on [models.dev](https://models.dev) under the `anyapi` provider.

1. Head over to the [AnyAPI Dashboard](https://dash.anyapi.ai), create an account, and generate an API key in [API Keys](https://dash.anyapi.ai/?page=api-keys).

2. Run the `/connect` command and search for AnyAPI.

```txt
/connect
```

3. Enter your AnyAPI API key.

```txt
┌ API key
└ enter
```

4. Run the `/models` command to select a model.

```txt
/models
```

AnyAPI models are dynamically fetched from the catalog. You can also set a specific model via config:

```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"model": "anyapi/openai/gpt-4o"
}
```

---

### LLM Gateway

1. Head over to the [LLM Gateway dashboard](https://llmgateway.io/dashboard), click **Create API Key**, and copy the key.
Expand Down
Loading