The official Python library for the opencode API. Currently at version 0.1.0a36 (alpha). Provides synchronous and asynchronous clients for interacting with opencode services. Under active development with frequent alpha releases.
pip install opencode-aiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the client and list available models.
Use `opencode-ai==0.1.0a36` in requirements.txt.
Always set the API key: `client = OpenCode(api_key='...')` or export `OPENCODE_API_KEY`.
Use `from opencode import OpenCode`.