AI0-001 AI Infrastructure and Technologies Practice Question
A developer wants to integrate an AI-powered text summarization API into their application. They need to authenticate securely and manage usage limits. What is the standard mechanism for authenticating with cloud-based AI services?
⚠ Common exam trap
CompTIA often tests the misconception that embedding credentials in a URL or request body is acceptable for simplicity, but the trap here is that API keys must never appear in URLs or bodies due to security risks like exposure in server logs and referrer headers, making the HTTP header the only standard and secure option.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Include an API key in the HTTP request header
Cloud-based AI services, including text summarization APIs, standardize authentication via API keys passed in the HTTP header (e.g., `Authorization: Bearer <key>` or `x-api-key: <key>`). This method keeps credentials out of URLs and request bodies, preventing exposure in logs or caches, and aligns with RESTful API best practices and OWASP guidelines for secure API access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Provide a username and password in the request body
Why it's wrong here
Credentials in the request body are not the standard mechanism; cloud AI services expect an API key or OAuth bearer token in the Authorization header, which also carries quota attribution. It is tempting because username and password suit interactive user sign-in, the correct choice when a human authenticates to a portal rather than an application calling an API.
- ✗
Embed the API key in the URL query string
Why it's wrong here
Query-string API keys leak into proxy logs, browser history and referrer headers, and cloud AI services reject or discourage this pattern. It is tempting because it is trivial to append to a URL during quick testing, which is acceptable only for throwaway scripts against non-production endpoints with no sensitive data.
- ✗
Use a digital certificate for each request
Why it's wrong here
Cloud AI APIs authenticate with API keys or OAuth tokens, not per-request client certificates, which add mutual-TLS overhead without managing usage quotas. It is tempting because certificates suit service-to-service mutual authentication, the right choice when an internal PKI already issues identities and the endpoint must prove its identity cryptographically.
- ✓
Include an API key in the HTTP request header
Why this is correct
API keys passed in the HTTP request header authenticate the calling application to the cloud AI service and let the provider meter and enforce usage quotas per key, directly satisfying the secure authentication and usage-limit management requirements in the stem.
About these practice questions
Courseiva writes every AI0-001 question from scratch — 962 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.