Documentation

OpenCode

Configure OpenCode with an OpenAI provider override that points to Prismatic.

Configuration

  • Place the config in ~/.config/opencode/opencode.json or the project opencode.json.
  • Override the OpenAI provider baseURL with https://api.prismaticapi.com/v1.
  • Set model to openai/public-model-id.
  • Set small_model to a cheaper/faster model for lightweight work.

Example

{
  "provider": {
    "openai": {
      "options": {
        "baseURL": "https://api.prismaticapi.com/v1",
        "apiKey": "pa_YOUR_KEY",
        "timeout": 600000
      }
    }
  },
  "model": "openai/claude-sonnet-4-6",
  "small_model": "openai/claude-haiku-4-5"
}
export OPENAI_API_KEY="pa_YOUR_KEY"

opencode auth login
opencode models --refresh

Recommended models

  • claude-sonnet-4-6 — strong model for reasoning, refactors and coding agents.
  • claude-haiku-4-5 — fast option for autocomplete, small questions and lightweight tasks.
  • deepseek-v3-2 or another public ID — alternative based on your active catalog and plan.

Troubleshooting

Authentication error

Check that the API key has no extra spaces and has not been revoked in the dashboard.

Model rejected

Use a public model ID returned by GET /v1/models; do not use labels or aliases.

Connection issue

Confirm the configured base URL is exactly the one shown above and that your network allows HTTPS to api.prismaticapi.com.

Notes

  • Run opencode auth login if your local OpenCode setup stores credentials separately.
  • Run opencode models --refresh if the model list is cached.
  • Use the openai/ prefix when OpenCode expects a provider/model name.