ChannelDocsOpen workspace ↗

Client libraries

Rust, Python and C++ use the same HTTPS contract. There is no Channel package to install. Each quickstart reads CHANNEL_API_KEY and prints a receipt suitable for reconciliation.

Rust

Use blocking Reqwest with JSON support and Serde JSON for the response. Capture HTTP status before consuming the body. In a long-running server, reuse the client so connections can be pooled. Move blocking work off an async executor or use an async client in your own integration.

Rust setup and source

Python

The example uses urllib and json from the standard library. Encode the payload before setting the bearer and JSON headers. Set an explicit user-agent and timeout. On HTTPError, read the body once for the gateway’s diagnostic message.

Python setup and source

C++

Build a C++17 executable with CMake, cpr and nlohmann-json. Use the same architecture for the executable and installed libraries. On Windows select the vcpkg toolchain when configuring and run the executable from the Release output directory with its runtime DLLs.

C++ setup, source and CMake

OpenAI compatibility

Channel accepts a subset of the Chat Completions wire format. Configure the base URL including /v1. Clients that default to /responses, streaming, conversation histories or function tools need different settings. An HTTP 200 does not establish support for extra fields your SDK sends.