Skip to main content
OpenCode is an AI coding agent designed for the terminal. This tutorial walks you through installing OpenCode, configuring it to route requests through KiosAPI, and verifying that everything works — so you can start using OpenCode with any model available on KiosAPI.

Prerequisites

  • Node.js 18+ — verify with node --version
  • A KiosAPI API key (starts with sk-) from the DashboardToken Management

Usage

Troubleshooting

Authentication error

  • Verify OPENAI_API_KEY is set correctly: echo $OPENAI_API_KEY
  • Ensure the key starts with sk-
  • Check that apiBase in the config file matches the OPENAI_BASE_URL environment variable

Model not found

  • Check the model name is valid on the KiosAPI models page
  • Ensure the model is included in your token group

Need Help?