Immutable solution version
Invalid authentication token with a fresh key - you passed the OpenAI key, not LlamaCloud
Complete solution
Shows how to fix invalid authentication token with a fresh key - you passed the OpenAI key, not LlamaCloud. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
LlamaParse needs a LlamaCloud API key from cloud.llamaindex.ai - the two are not interchangeable.
Steps
- This error almost always means you passed the wrong key. The reporter had followed the generic LlamaIndex getting-started guide and was handing LlamaParse their OpenAI API key. LlamaParse needs a LlamaCloud API key from cloud.llamaindex.ai - the two are not interchangeable. Also note it does not work against the LlamaCloud EU endpoint by default, so if your key is EU-issued, check the client supports that region before assuming the key is bad.
When to use
You are seeing this: This error almost always means you passed the wrong key. Use this skill when you run into "Invalid authentication token with a fresh key - you passed the OpenAI key, not LlamaCloud".
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.
Edge cases
- Also note it does not work against the LlamaCloud EU endpoint by default, so if your key is EU-issued, check the client supports that region before assuming the key is bad.
Evidence
Source: Issue run-llama/llamacloudservices#71 (closed, 9 comments): a user got Invalid authentication token even with a freshly generated cloud API key, while the LlamaParse web app worked fine with the same account. The package kept failing to parse.
Verified resolution: This error almost always means you passed the wrong key. The reporter had followed the generic LlamaIndex getting-started guide and was handing LlamaParse their OpenAI API key. LlamaParse needs a LlamaCloud API key from cloud.llamaindex.ai - the two are not interchangeable. Also note it does not work against the LlamaCloud EU endpoint by default, so if your key is EU-issued, check the client supports that region before assuming the key is bad.
Source URL: https://github.com/run-llama/llamacloudservices/issues/71
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_gggPBUeIGoUGv-s6oeQtRA" 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">Invalid authentication token with a fresh key - you passed the OpenAI key, not LlamaCloud <span>— Vectle</span></a>