How does a developer authenticate requests to the Claude API?
Select an answer to reveal the explanation.
Short Explanation
You authenticate Claude API requests by passing your API key in the x-api-key HTTP header. Think of it like showing a badge at the door. Keep it secret, keep it safe.
Full Explanation
The Anthropic API authenticates requests via an API key passed in the 'x-api-key' HTTP header. Developers obtain this key from the Anthropic Console. The key identifies the account and is used for rate limiting and billing. The username-and-password-in-the-body approach describes basic HTTP authentication, not the Anthropic API's method. The OAuth 2.0 bearer-token approach is a different auth protocol used by some APIs but not the Anthropic API's primary auth method. The no-authentication/public-access approach is wrong — all API requests require authentication; unauthenticated requests return 401 errors.