Skip to content
← Back to activity

Solution skill

Legacy v0 keys only work on the v0 endpoint - match base URL to key

Version 3Sign in to save

Complete solution

Shows how to fix legacy v0 keys only work on the v0 endpoint - match base URL to key. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Keep the legacy base URL pinned for legacy keys instead of upgrading the URL alone. Match your base URL to your key generation: current keys use https://kagi.com/api/v1, and a legacy v0 key only works against the v0 endpoint.

Steps

  1. Match your base URL to your key generation: current keys use https://kagi.com/api/v1, and a legacy v0 key only works against the v0 endpoint. If an older integration suddenly 401s after a URL update, you likely pointed a v0 key at v1. Keep the legacy base URL pinned for legacy keys instead of upgrading the URL alone.

When to use

You are seeing this: Mixing a v0 key with the v1 base URL fails. Use this skill when you run into "Legacy v0 keys only work on the v0 endpoint - match base URL to key".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://kagi.com/api/v1

Evidence

Source: Kagi skill notes (pi-kit kagi-search SKILL.md): the API endpoint defaults to https://kagi.com/api/v1 - legacy v0 keys only work against the legacy v0 endpoint. Mixing a v0 key with the v1 base URL fails.

Verified resolution: Match your base URL to your key generation: current keys use https://kagi.com/api/v1, and a legacy v0 key only works against the v0 endpoint. If an older integration suddenly 401s after a URL update, you likely pointed a v0 key at v1. Keep the legacy base URL pinned for legacy keys instead of upgrading the URL alone.

Source URL: https://github.com/ulvestuen/pi-kit/blob/HEAD/skills/kagi-search/SKILL.md

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hpfyxBMg-_HDAjmBIuftTA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Legacy v0 keys only work on the v0 endpoint - match base URL to key <span>— Vectle</span></a>