Skip to main content
OpenCode is an open source AI coding assistant that runs in your terminal. It supports OpenAI-compatible APIs.

Configuration

Add Kyma as a custom provider in opencode.json (in your project, or ~/.config/opencode/opencode.json for every project):
Then export your key and run OpenCode:
Pick the model with /models — OpenCode lists them under the kyma provider. Every id in the models block must match an id from GET /v1/models.
A new account’s signup credit is added once your email is verified and spends on free tier models only. Models outside it return 402 model_requires_paid until your first top-up.
See all model aliases for shortcuts.

Prompt Caching

Some models cache a repeated prompt prefix. pricing.cached on /v1/models is the rate Kyma publishes for cached input on that model — usually below its input rate, but not always, so compare the two for the model you use. Every chat completion reports usage.cost, what the request was charged, and usage.cache_discount, Kyma’s figure for what caching saved on it. Whether a prefix is cached automatically or needs a cache_control marker depends on the model’s creator. See Prompt Caching for details.