Menu

How do you fix "Auth conflict", 401, and /v1/v1 404 with ANTHROPIC_BASE_URL?
📰

How do you fix "Auth conflict", 401, and /v1/v1 404 with ANTHROPIC_BASE_URL?

DEV Community: authentication·Xisu AI Team·about 5 hours ago
#xzAhVZ2m
#devtoauthentication#devto#dev#client#base
Reading 0:00
15s threshold

How do you fix "Auth conflict", 401, and /v1/v1 404 with ANTHROPIC_BASE_URL?

401 Unauthorized usually means the client sent the wrong credential or sent two conflicting credential sources. The /v1/v1 error is a URL composition problem: the documented base URL already ends in /v1 , so a client that appends another /v1 creates an invalid path. Set the base URL once, use one API key source, and test the final request URL before running the full coding workflow.

TL;DR

Use this base URL when the client accepts a base URL that already includes the API version:

export ANTHROPIC_BASE_URL = "https://api.xisu.ai/v1"

Enter fullscreen mode

Exit fullscreen mode

Do not configure an additional /v1 suffix in the client. The valid chat endpoint is:

POST $ANTHROPIC_BASE_URL/chat/completions

Enter fullscreen mode

Exit fullscreen mode

For authentication, keep one active API key source.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.