Skip to content

API Key 401 Invalid API key — muse-spark-1.2-contributor models list works but chat rejected #46169

Closed as duplicate

Description

@polygamepgm-maker

Description

I am located in Taiwan, which is not among Meta's restricted territories for API access.

API Key (sk-Nkp...) successfully calls the /models endpoint (HTTP 200) and correctly returns the model list including muse-spark-1.2-contributor.

However, all chat completion / responses endpoints return 401 Invalid API key regardless of which model is used:

  • muse-spark-1.2-contributor → 401 Invalid API key
  • muse-spark-1.2-contributor-free → 401 Model muse-spark-1.2-contributor-free is not supported (confirmed this is not a valid model name)
  • gpt-5.3-codex → 401 Invalid API key

Endpoints tested:

  • https://opencode.ai/zen/go/v1/chat/completions → 401
  • https://opencode.ai/zen/go/v1/responses → 401

Test time: 2026-08-31 ~01:00 +08:00 (UTC+8)

Relevant settings:

  • "Allow models that use request data for training" is enabled (this is a data privacy setting and likely unrelated to API key validation)

Expected behavior:
API Key with /models access should be able to call chat completion endpoints.

Actual behavior:
All chat-related endpoints return 401 Invalid API key.

Request:
Please confirm whether this API key has chat completion / responses permissions enabled, or if a new key needs to be generated.


Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is different from the above, please add more detail to distinguish it (e.g., account type, subscription plan, when the key was generated).

  2. felixzsh commented on Sep 10, 2026

    @felixzsh
    Contributor

    im in mexico (not restricted) and i get this error sporadically: Error: Error from provider (Console Go): Upstream request failed: [invalid_api_key] Unauthorized

  3. Tarquinen commented on Oct 20, 2026

    @Tarquinen
    Member

    Thanks for the report! Closing as a duplicate of #50885, which has the answer: #50885 (comment)

    In short: in OpenCode 2.0, run /connect, choose opencode, and pick the workspace that has Go when signing in. Then select a model marked as Go. To use an API key instead, create one under a service account in the console and add it with /connect → opencode go.

    If this still fails on 2.0, please open a new issue with your version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions