Apertis for OpenCode CLI

Predictable Coding Plan capacity. PAYG overflow when a task burns more than expected. One OpenAI-compatible endpoint that covers OpenAI, Anthropic, Google, Alibaba (Qwen), Moonshot, Zhipu (GLM), and DeepSeek. You stay in OpenCode. Your agent spend goes through one place.

Who this is for

Prerequisites

Setup

1. Pick a Coding Plan (or enable PAYG)

Open apertis.ai/settings/subscription and pick a plan that fits your expected daily usage:

You can also skip a plan and use pay-as-you-go pricing, billed per request at the underlying model's cost.

2. Create an API key

apertis.ai/settings/apiKeysCreate API Key → copy the full sk-... value once (it is not shown again).

3. Point OpenCode at Apertis

Apertis exposes an OpenAI-compatible endpoint at https://api.stima.tech/v1. Configure OpenCode the same way you would point it at any OpenAI-compatible provider — see the OpenCode docs for the exact configuration mechanism your installed version uses.

Typical environment-variable style:

export OPENAI_API_KEY="sk-YOUR_APERTIS_KEY"
export OPENAI_BASE_URL="https://api.stima.tech/v1"

Then run OpenCode as normal. The OpenAI-compatible endpoint accepts standard POST /v1/chat/completions requests.

4. Verify

Run any normal OpenCode command. If you see model output, the integration is working. If you see 401 Unauthorized, re-check the API key. If you see 404 Model Not Found, the model isn't in your current plan — pick a different one at apertis.ai/models.

5. Watch your usage

apertis.ai/log shows request count, token usage, and cost per request as soon as the response completes. You'll see which underlying model handled each call.

Choosing a model

Apertis routes the same model name to whichever upstream provider has capacity. The full live list and per-model pricing live at apertis.ai/models — that page is the source of truth and updates more often than any static guide.

Common picks for OpenCode workflows:

PAYG Overflow

Every plan includes optional pay-as-you-go overflow. Once you exhaust the monthly Coding Plan quota, Apertis charges per-request at the underlying model's cost. You can cap monthly PAYG spending at apertis.ai/settings/billing.

Common errors

Error Meaning Next
401 Unauthorized API key missing or wrong Re-copy the key from apertis.ai/settings/apiKeys
404 Model Not Found Model isn't in your current plan Pick another at apertis.ai/models or upgrade the plan
429 Too Many Requests Rate-limited by your plan tier Enable PAYG overflow or upgrade the plan
Connection error DNS / network / firewall Try curl https://api.stima.tech/v1/models -H "Authorization: Bearer sk-..."

Start here

Start with a Coding Plan for steady capacity, add PAYG overflow for the days you burn more.

Pick a Coding Plan