{"id":45689,"library":"opencode-ai","title":"opencode","description":"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.","status":"active","version":"0.1.0a36","language":"python","source_language":"en","source_url":"https://github.com/sst/opencode-sdk-python","tags":["api-client","sdk","openapi"],"install":[{"cmd":"pip install opencode-ai","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client used by the library","package":"httpx","optional":false},{"reason":"Data validation and serialization","package":"pydantic","optional":false}],"imports":[{"wrong":"from opencode import OpenCode","symbol":"Client","correct":"from opencode_ai import Client"},{"wrong":"from opencode import OpenCode","symbol":"AsyncClient","correct":"from opencode_ai import AsyncClient"},{"wrong":"from opencode import OpenCode","symbol":"AsyncOpencode","correct":"from opencode_ai import AsyncOpencode"}],"quickstart":{"code":"from opencode import OpenCode\n\nclient = OpenCode(api_key='your_api_key_here')\nresponse = client.models.list()\nprint(response)","lang":"python","description":"Initialize the client and list available models."},"warnings":[{"fix":"Use `opencode-ai==0.1.0a36` in requirements.txt.","message":"The library is in alpha (0.1.0a36). API surface and client interfaces may change without notice. Pin to a specific version in production.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Always set the API key: `client = OpenCode(api_key='...')` or export `OPENCODE_API_KEY`.","message":"The client expects the API key to be passed as a parameter or set as `OPENCODE_API_KEY` environment variable. If neither is provided, the client will raise an authentication error at the first API call.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from opencode import OpenCode`.","message":"Importing `opencode` directly (without `.OpenCode`) is deprecated. In future versions, `import opencode` may change behavior.","severity":"deprecated","affected_versions":"0.1.x"}],"env_vars":null,"search_vec":"'0.1.0':13 'a36':14 'activ':27 'alpha':15,31 'api':9,34 'api-cli':33 'asynchron':19 'client':20,35 'current':10 'develop':28 'frequent':30 'interact':22 'librari':5 'offici':3 'openapi':37 'opencod':1,8,24 'provid':16 'python':4 'releas':32 'sdk':36 'servic':25 'synchron':17 'version':12","created_at":"2026-06-07T12:56:14.442948+00:00","updated_at":"2026-06-07T12:56:14.442948+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/sst/opencode-sdk-python","github":"https://github.com/sst/opencode-sdk-python","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}