Courseiva
Using OCI Generative AI ServiceeasyMultiple ChoiceObjective-mapped

1Z0-1127-25 Using OCI Generative AI Service Practice Question

A developer is using the OCI Generative AI SDK in Python to call the cohere.command model. They are getting a 401 Unauthorized error. They have configured the SDK with their tenancy OCID and user OCID. What is the most likely missing piece?

⚠ Common exam trap

Many candidates assume providing tenancy and user OCIDs is sufficient for authentication, overlooking that OCI requires a cryptographic signing key or token to prove identity.

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

API key or token.

The 401 Unauthorized error indicates that the request lacks valid authentication credentials. In the OCI Generative AI SDK, even when tenancy and user OCIDs are provided, the SDK requires an API signing key or a token (such as an OCI API key pair or a session token from an instance principal) to sign requests. Without this key or token, the SDK cannot authenticate the request to the OCI API, resulting in a 401 error.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Correct region endpoint.

    Why it's wrong here

    Wrong endpoint leads to connectivity errors, not 401.

  • Model OCID.

    Why it's wrong here

    Model OCID is used to specify the model, not for authentication.

  • API key or token.

    Why this is correct

    Authentication requires a valid API key or token; omitting it causes 401 errors.

  • Compartment OCID.

    Why it's wrong here

    Compartment OCID is for resource organization, not authentication.

About these practice questions

One of 768 original 1Z0-1127-25 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-1127-25 practice question is part of Courseiva's free Oracle 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 1Z0-1127-25 exam.