Let's say you want to host domains first.com and second.com.
Create folders for their files:
OpenRouter provides an OpenAI-compatible completion API to 0 models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.
In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.
from openai import OpenAI
Now Z.ai has an official solution to use the package. See below.
First we need to create a custom provider for the Z.ai anthropic API. Follow the instructions for adding a custom provider to opencode.
zai-anthropicEdit opencode.json and add this: