---
title: "Connect opencode to apiToken.sale"
description: "Wire opencode to the apiToken.sale OpenAI-compatible endpoint with one provider block and run GPT-5.6 models on your prepaid balance."
url: "https://apitoken.sale/int-opencode"
language: "en"
---
# Connect opencode to apiToken.sale

Wire opencode to the apiToken.sale OpenAI-compatible endpoint with one provider block and run GPT-5.6 models on your prepaid balance.

## Steps

1. Create a key at https://apitoken.sale/register — it looks like `sk-pool-…` and works across every Claude and GPT model.
2. Point opencode at the OpenAI-compatible surface: base URL `https://openai.api.apitoken.sale/v1`, key sent as `Authorization: Bearer`.
3. Pick a GPT model (e.g. `gpt-5.6-sol`) and start — billing is per token at your discount, `GET /v1/models` lists the enabled set.

## Configuration

```
// opencode.json — provider block
{
  "provider": {
    "apitoken": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "apiToken.sale",
      "options": {
        "baseURL": "https://openai.api.apitoken.sale/v1",
        "apiKey": "{env:APITOKEN_API_KEY}"
      },
      "models": {
        "gpt-5.6-sol": { "name": "GPT-5.6 Sol" }
      }
    }
  }
}
```

---
API reference: https://apitoken.sale/md/docs · All integrations: https://apitoken.sale/md/int
