Tools

OpenCode

Open-source CLI agent. Configure it with the ApiMira base URL and any model ID.

OpenCode describes a provider in opencode.json and takes the key from an environment variable.

What you need

Base URL
https://apimira.com/v1
API key
am-YOUR_KEYCreated in the dashboard, the API keys section. The full value is shown once.
Model ID
google/gemini-3.7-flashCopy it from the catalogue in full, including the prefix before the slash.

How to connect

  1. 1Add the provider block to opencode.json — in the project folder or in ~/.config/opencode/.
  2. 2Put the key into the APIMIRA_API_KEY environment variable.
  3. 3Run opencode and pick the model with /models.
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "apimira": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "ApiMira",
      "options": {
        "baseURL": "https://apimira.com/v1",
        "apiKey": "{env:APIMIRA_API_KEY}"
      },
      "models": {
        "openai/gpt-6-astra": { "name": "GPT-6 Astra" }
      }
    }
  }
}

Models are listed in the config by name: OpenCode does not ask the provider for a list. Need another one — add a line to models.

Function calling is supported, so agentic modes work. Strict JSON mode (response_format) and the retired functions format are rejected with an unsupported_parameter error — the parameter is never silently dropped. Image input is accepted by models marked "Sees images" on the Models page: a content part of type image_url with a data:image/png;base64,… URL (PNG, JPEG or WebP, up to 5 MB each, up to 50 per request). Remote URLs are not fetched, and a model without that mark answers with unsupported_capability — both errors name the reason outright.