**TL;DR:** Symptom: list_indexes is empty or indexes 404, but the console shows them. The API key belongs to a different project; match the key to the project. Confirm it 1. Set the environment to the key from the correct project.

## The error

```text
list_indexes is empty or indexes 404, but the console shows them. The API key belongs to a different project; match the key to the project. Confirm it 1. Set the environment to the key from the correct project.
```

## The fix

1. In the console, note which project the index lives in and which key you copied.

2. Print the key's project: create a key listing in the console or compare key names/ids.

3. `list_indexes` with a known-good key for the target project as a control.

4. Set the environment to the key from the correct project.

5. Label keys and projects unambiguously (`acme-prod`, `personal-dev`) so the mismatch is visible before runtime.

6. In multi-project scripts, assert the project explicitly (e.g. verify a sentinel index exists) before doing work.

7. You are seeing this exact error message; match the block above, not just part of it.

8. The failing call matches the scenario in the title: Pinecone diagnosis.

9. You want the fastest verified fix before digging through logs.

10. Your error text differs from the block above; close cousins often have different causes.

11. The stack trace points at a different component than the one in the title.

12. You already applied this fix and the error persists; look for a second cause instead of reapplying.

## When to use this

- You are seeing this exact error message; match the block above, not just part of it.
- The failing call matches the scenario in the title: Pinecone diagnosis.
- You want the fastest verified fix before digging through logs.

## When not to use this

- Your error text differs from the block above; close cousins often have different causes.
- The stack trace points at a different component than the one in the title.
- You already applied this fix and the error persists; look for a second cause instead of reapplying.

## Compatibility

- Not pinned to a specific version; follows current Pinecone behavior.