Which Headers Does Azure Translator REST API Require?

Analyze and translate text
Answer Correct answer: D — Include the subscription key (Ocp-Apim-Subscription-Key), subscription region (Ocp-Apim-Subscription-Region), and Content-Type headers for Translator1.

You have an Azure subscription that contains a multi-service Azure Cognitive Services Translator resource named Translator1. You are building an app that will translate text and documents by using Translator1. You need to create the REST API request for the app. Which headers should you include in the request?

  1. the access control request, the content type, and the content length
  2. the subscription key and the client trace ID
  3. the resource ID and the content language
  4. the subscription key, the subscription region, and the content type Correct Answer

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The question tests header requirements for a multi-service Translator resource; the trap is assuming only the subscription key or generic HTTP headers are sufficient.

Azure Cognitive Services Translator requires authentication and content negotiation headers for REST calls. This page confirms that a multi-service Translator resource needs the subscription key, subscription region, and content type, not generic HTTP or optional tracing headers.

A frequent wrong choice is B, because candidates remember the subscription key and client trace ID but forget that a multi-service resource also requires the subscription region and the Content-Type header.

Community Discussion (8 comments)

audlindr 👍 10 Selected: D
Answer is correct https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-translate content-type is required header https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference When you use a multi-service secret key, you must include two authentication headers with your request. There are two headers that you need to call the Translator. Ocp-Apim-Subscription-Key The value is the Azure secret key for your multi-service resource. Ocp-Apim-Subscription-Region The value is the region of the multi-service resource. Region is required for the multi-service Text API subscription. The region you select is the only region that you can use for text translation when using the multi-service key. It must be the same region you selected when you signed up for your multi-service subscription through the Azure portal. D is the only option with both the headers
Murtuza 👍 5
To create the REST API request for your app that will translate text and documents using the Azure Cognitive Services Translator resource (Translator1), you should include the following headers: Subscription Key: This key serves as the authentication token to access the service. Subscription Region: The region where your Translator resource is deployed. Content Type: Specify the type of content you are sending (e.g., JSON, plain text). Therefore, the correct answer is D. the subscription key, the subscription region, and the content type. When making the API request, ensure that you include these headers to connect your application to the Translator service.
syupwsh 👍 1 Selected: D
https://learn.microsoft.com/en-us/azure/ai-services/translator/quickstart-text-rest-api?tabs=csharp#headers https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference Answer is D
anto69 👍 1 Selected: D
D for Copilot too
HaraTadahisa 👍 1 Selected: D
I say this answer is D. Please hurry up and transport the meat.
reigenchimpo 👍 1 Selected: D
D is answer.
takaimomoGcup 👍 1 Selected: D
the subscription key, the subscription region, and the content type
kay1101 👍 2
D. https://learn.microsoft.com/en-us/azure/ai-services/translator/quickstart-text-rest-api?tabs=csharp#headers

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option D is correct because the Translator v3 REST API for a multi-service Cognitive Services resource authenticates with both Ocp-Apim-Subscription-Key and Ocp-Apim-Subscription-Region, and the translate operation also requires Content-Type: application/json. The subscription key proves access to Translator1, while the region header tells the multi-service endpoint where the resource is deployed. Without the region, a multi-service key cannot be routed reliably. The Content-Type header is mandatory when sending the JSON body for text or document translation. This combination matches the required request headers for Translator1.

Why the Other Options Are Wrong

Option A lists generic HTTP or CORS-style headers such as access control request, content type, and content length, but it omits authentication. Option B includes the subscription key and a client trace ID; the trace ID is optional diagnostics and does not replace the required region or content type headers. Option C names a resource ID and content language, neither of which authenticates a Translator request; content language is typically a query parameter or body field. Therefore A, B, and C all miss at least one header that Translator1 requires.

Community Comment Notes

As audlindr noted, Microsoft documentation states the content type is required and that with a multi-service secret key "you must include two authentication headers with your request." Murtuza likewise listed the subscription key, subscription region, and content type as the needed headers. takaimomoGcup put it as "the subscription key, the subscription region, and the content type." kay1101 pointed to the Translator quickstart headers and selected D. The consistent community vote for D reflects the documented requirement for multi-service Translator resources.

Official Reference

Exam Strategy

For multi-service Translator resources, always include both Ocp-Apim-Subscription-Key and Ocp-Apim-Subscription-Region alongside Content-Type: application/json for JSON requests. Single-service Translator resources may not need the region header, which is why the multi-service detail in the question matters.

Frequently Asked Questions

Why does a multi-service Translator resource need the subscription region header?

Because a multi-service key can be used with several services and regions, Translator needs Ocp-Apim-Subscription-Region to route the request to Translator1's deployment.

Is Content-Type required for Azure Translator REST text translation?

Yes. The Translator v3 translate operation expects Content-Type: application/json when you send a JSON request body, in addition to the subscription key and region headers.

Related Analysis

← Back to AI-102 Study Guide