Skip to main content
Requests to your own models go straight to your provider with your key, so when the provider refuses one, nemu passes the reason on instead of hiding it. In chat the message appears on the failed reply. Through the API it is the body of the error response, and the x-nemu-error-origin header says provider when the refusal came from your provider and nemu when it came from us.

Anthropic: the key is not scoped to a workspace

The message reads like this:
This API key is not scoped to a workspace, so this request must include the anthropic-workspace-id header with the ID of the workspace to use.
Anthropic accepts two kinds of key, the long sk-ant-api03 form and the sk-ant-usr form. Either works. What matters is the scope the key was created with, and it has to be a workspace, for example Default workspace. A key created with the Organization scope does not say which workspace to bill, so Anthropic refuses it. There are two ways to fix it.
  1. Create a new key in the Anthropic console with the scope set to a workspace, then replace the key on the provider in the console.
  2. Keep the key and add a header. Open the provider, choose Customize headers, and add anthropic-workspace-id with the ID of the workspace you want to use. See custom headers.
A key scoped to a workspace cannot use Anthropic’s Admin API.

Other refusals

A 429 that comes from nemu rather than the provider is a plan limit instead, and is described under plans.