# OpenCode API client for Haskell

**URL:** <https://discourse.haskell.org/t/opencode-api-client-for-haskell/13819>\
**Category:** Announcements\
**Created:** [March 17, 2026, 8:41pm UTC](https://discourse.haskell.org/t/opencode-api-client-for-haskell/13819 "2026-03-17T20:41:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![srid](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/srid/32/5514_2.png) [@srid](https://discourse.haskell.org/u/srid)\
**Post date:** [March 17, 2026, 8:41pm UTC](https://discourse.haskell.org/t/opencode-api-client-for-haskell/13819/1 "2026-03-17T20:41:04Z")

</div>

Haskell bindings for [SDK | OpenCode](https://opencode.ai/docs/sdk/)

> **[GitHub - srid/opencode-haskell: Haskell client library for OpenCode](https://github.com/srid/opencode-haskell)**
>
> Haskell client library for OpenCode

There is a `nix run`’able example in the repo:

```haskell
# First, run the opencode web UI or the headless server
opencode web --port 4096

# Run the example
cd opencode-haskell/
nix run .#example -- localhost:4096

```

Result:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/haskell/original/2X/a/a004848073b35efc6cf2b96b639fbec0bb24d9ef.jpeg)
