Claude as custom AI not working

Hi there, I attempted to set up Claude (anthropic) as a custom AI provider. When I do, the URL I can think to use is https://api.anthropic.com/v1/. Dong that it doesn’t seem to register it, and any attempt to set a model or do anything more gives an HTTP400, even though my key has been created on the console and is valid. Any ideas?

I tried https://api.anthropic.com/v1/messages, https://api.anthropic.com/, etc.

Same here. I got the MCP working, but it isn’t recognizing Claude as the custom AI provider.

Same here.

I found out what I think the issue is. Open AI uses a different header than Anthropic. Anthropic’s API needs a header which, I think, is missing from eMclient. Here is the error that is returned:

{“type”:“error”,“error”:{“type”:“invalid_request_error”,“message”:“anthropic-version: header is required”},“request_id”:“req_011CgDu1XtZJ2Eb4qigi5zDb”}
HTTP 400

From platform.claude.com

To use the OpenAI SDK compatibility feature, you’ll need to:

Use an official OpenAI SDK
Change the following
Update your base URL to point to the Claude API
Replace your API key with a Claude API key from the Claude Console
If your key is a personal or service account key with access to multiple workspaces, also send the anthropic-workspace-id header on every request (for example, default_headers in the Python SDK or defaultHeaders in TypeScript); see Select a workspace
Update your model name to use a Claude model

I haven’t tested whether it works with a key that was registered for only one workspace.
I think emClient would need to add a corresponding option here to make this work.

I think eM Client just needs to have the header configured when Claude is selected. I found an easier workaround (and Claude suggested it). I created a proxy server, put the server’s address in the API URL field, and filled in the key. The proxy server formats the header properly and passes the key. It’s working now.

We are working hard on improving compatibility with other AI endpoints including Claude. It will be included in the next update (just a few days from now).

I have every confidence you will. You guys rock!

Hi there, is there a documentation update on getting claude as ai provider to function?

There is a new V11.0.1577 for Pc & Mac just released that has Improved compatibility with custom AI providers (including Claude) so suggest to give that a go via the release history page.

hi, yes I had updated to that before testing again. I was asking for documentation from Emclient if they had any. At this point I have switched back to New Outlook as emc was too much fiddling for email.