Translate API for Azure Translator in Foundry Tools 2025-10-01-preview using LLM + adaptiveDatasetId
This implies that the adaptCT dataset indexes are to be used with the LLM deployment to fine tune translation output.
I have used the REST API to create the Adaptive DataSet Document and the index from it. The Id returned for the index is an int, but the translate API expects a string for the adaptiveDatasetId parameter. (https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/preview/translate-api)
using either the ID or the Name of the DataSet Index results in the following error:
Service request failed.
Status: 400 (Bad Request)
Content:
{"error":{"code":400134,"message":"The adaptive dataset ID in targets is invalid."}}
What is required to use the adaptCT functionality?
Thank you.
-
Jerald Felix 13,500 Reputation points β’ Volunteer Moderator
Hello Baz Heath,
Greetings!
Thanks for raising this question in Q&A forum.
The error
"The adaptive dataset ID in targets is invalid"(error code 400134) is happening because theadaptiveDatasetIdfield in the Translate API does not accept the raw integer ID or the name returned by the dataset index creation API. It expects a specific string format that combines your workspace (project) ID and the index ID together. Let me walk you through the correct end-to-end process to get this working.Step 1: Make sure you are using the correct API version
The adaptCT feature requires the preview API version. Ensure your Translate API call uses:
api-version=2025-05-01-previewStep 2: Retrieve your Workspace ID
Call the Get All Projects endpoint to get your
workspaceId(this is a string GUID, not an integer):curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/workspaces/" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>"Note down the
workspaceIdfrom the response β you will need it in the next steps.Step 3: Retrieve your Dataset Index ID
Call the Get All Dataset Indexes endpoint using your
workspaceId:curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/index?workspaceId=<workspaceId>" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>"From the response, look for the
idfield of the index β note this value carefully as a string.Step 4: Use the correct adaptiveDatasetId format in the Translate API
When calling the Translate API, pass the
adaptiveDatasetIdas a string in thetargetsarray. The value should be the index ID string returned from the Get Dataset Index response (not the integer from creation, and not the index name). Here is an example:curl -X POST "https://<your-resource-name>.cognitiveservices.azure.com/translator/text/v3.0/translate?api-version=2025-05-01-preview&from=en&to=fr" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>" \ -H "Content-Type: application/json" \ -d "[{ \"Text\": \"Hello, how are you?\" }]" \ --data-urlencode "adaptiveDatasetId=<your-index-id-as-string>"Step 5: Double-check these common mistakes
- Make sure the source and target languages in your dataset index exactly match the
fromandtoparameters in the Translate API call (e.g.,entofr). - Confirm your dataset index status is ready/active before using it β an index still being built will also cause this error.
- Ensure you are passing all three required headers:
Ocp-Apim-Subscription-Key,Ocp-Apim-Subscription-Region, and for document operations, theAuthorization: Bearer <token>header as well.
Step 6: If the issue still persists
Since this feature is currently in public preview, there may be undocumented behaviors or bugs. In that case:
- Open a support request via the Azure Portal against your Azure Translator / Foundry resource.
- Share the exact API request body you are sending (with keys redacted) along with the full error response.
- Request clarification on the correct
adaptiveDatasetIdstring format expected by the2025-05-01-previewTranslate API.
Quick Summary: The key thing to remember is β always use the string
idfield from the Get Dataset Index API response, and make sure your index is in a ready state before passing it to the Translate API. Do not use the integer returned at index creation time or the index name as theadaptiveDatasetId.If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards, Jerald Felix.Hello Baz Heath, Greetings! Thanks for raising this question in Q&A forum.
The error
"The adaptive dataset ID in targets is invalid"(error code 400134) is happening because theadaptiveDatasetIdfield in the Translate API does not accept the raw integer ID or the name returned by the dataset index creation API. It expects a specific string format that combines your workspace (project) ID and the index ID together. Let me walk you through the correct end-to-end process to get this working.Step 1: Make sure you are using the correct API version
The adaptCT feature requires the preview API version. Ensure your Translate API call uses:
api-version=2025-05-01-previewStep 2: Retrieve your Workspace ID
Call the Get All Projects endpoint to get your
workspaceId(this is a string GUID, not an integer):curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/workspaces/" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>"Note down the
workspaceIdfrom the response β you will need it in the next steps.Step 3: Retrieve your Dataset Index ID
Call the Get All Dataset Indexes endpoint using your
workspaceId:curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/index?workspaceId=<workspaceId>" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>"From the response, look for the
idfield of the index β note this value carefully as a string.Step 4: Use the correct adaptiveDatasetId format in the Translate API
When calling the Translate API, pass the
adaptiveDatasetIdas a string in thetargetsarray. The value should be the index ID string returned from the Get Dataset Index response (not the integer from creation, and not the index name). Here is an example:curl -X POST "https://<your-resource-name>.cognitiveservices.azure.com/translator/text/v3.0/translate?api-version=2025-05-01-preview&from=en&to=fr" \ -H "Ocp-Apim-Subscription-Key: <your-key>" \ -H "Ocp-Apim-Subscription-Region: <your-region>" \ -H "Content-Type: application/json" \ -d "[{ \"Text\": \"Hello, how are you?\" }]" \ --data-urlencode "adaptiveDatasetId=<your-index-id-as-string>"Step 5: Double-check these common mistakes
- Make sure the source and target languages in your dataset index exactly match the
fromandtoparameters in the Translate API call (e.g.,entofr). - Confirm your dataset index status is ready/active before using it β an index still being built will also cause this error.
- Ensure you are passing all three required headers:
Ocp-Apim-Subscription-Key,Ocp-Apim-Subscription-Region, and for document operations, theAuthorization: Bearer <token>header as well.
Step 6: If the issue still persists
Since this feature is currently in public preview, there may be undocumented behaviors or bugs. In that case:
- Open a support request via the Azure Portal against your Azure Translator / Foundry resource.
- Share the exact API request body you are sending (with keys redacted) along with the full error response.
- Request clarification on the correct
adaptiveDatasetIdstring format expected by the2025-05-01-previewTranslate API.
Quick Summary: The key thing to remember is β always use the string
idfield from the Get Dataset Index API response, and make sure your index is in a ready state before passing it to the Translate API. Do not use the integer returned at index creation time or the index name as theadaptiveDatasetId.If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.
- Make sure the source and target languages in your dataset index exactly match the
-
Baz Heath 5 Reputation points
This is the response from the Get All Dataset Indexes endpoint:
{ "indexes": [ { "id": 223, "name": "DtsDocs-en-es-edu-v1", "documents": [ { "documentInfo": { "name": "DtsDocs-En-Es-mini-v1", "isParallel": true, "createdBy": null, "modifiedBy": null, "files": [], "languages": [], "createdDate": "2026-04-23T22:43:03.96", "isAvailable": true, "indexDocuments": null, "id": 1528020, "documentType": "Adaptive", "extractedSentenceCount": 0, "characterCount": 0, "usedByPrioritizedModel": null }, "processedDocumentInfo": null } ], "createdBy": null, "createdDate": "2026-04-23T22:59:32.07", "status": "Linked", "apiDomain": "a0615c6a-9021-42af-9867-df13873f56a2-adaptive-DtsDocs-en-es-edu-v1", "sourceLanguage": "en", "targetLanguage": "es" } ] }Note, the id of the index is NOT a string. Using that value either as 223 or as "223" results in the same error.
Sign in to comment
1 answer
-
Sina Salam 30,166 Reputation points β’ Volunteer Moderator
Hello Baz Heath,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your Translate API for Azure Translator in Foundry Tools 2025-10-01-preview using LLM + adaptiveDatasetId is having issues.
For complete and non-misleading steps for incorrect API usage and configuration mismatch, the best practices are to correct endpoint, the headers, format and version alignment. Follow the below steps to resolve all issues simultaneously:
- Use the official Translator endpoint only:
https://api.cognitive.microsofttranslator.comis the documented global base URL for Text Translation v3.0, while regional or custom domains are used only for specific deployment scenarios such as geography control or private networking. - https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/reference/v3/reference, and https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/reference/v3/translate gives more insight. - Stay on the stable version for production: use
api-version=3.0, because the official preview usesapi-version=2025-10-01-previewand introduces a different request contract that should not be mixed with GA calls. - Send the required headers exactly as documented:
Ocp-Apim-Subscription-Key,Content-Type: application/json; charset=UTF-8, andOcp-Apim-Subscription-Regionwhen the resource is regional or multi-service. - https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/reference/v3/translate, https://docs.azure.cn/en-us/ai-services/translator/text-translation/reference/v3/reference - Use the GA request body format, not the preview schema: for v3.0, send a JSON array such as
[{ "Text": "Hello world" }]; the preview API instead expects aninputsobject withtargets, so mixing them causes request failures. - A valid GA cURL call is:
curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=fr" -H "Ocp-Apim-Subscription-Key: YOUR_KEY" -H "Ocp-Apim-Subscription-Region: YOUR_REGION" -H "Content-Type: application/json; charset=UTF-8" -d "[{\"Text\":\"Hello world\"}]". - Verify the resource before testing: create either a Translator resource or an Azure AI multi-service resource, then copy the correct key, region, and endpoint from the Azure portal.
- If you are using Azure AI Foundry preview features, keep the contract separate: Foundry-based preview translation still uses Translator, but it requires the preview API version and the newer
inputs/targetspayload model.
Troubleshoot in this order:
400usually means invalid parameters or body,401means authentication is wrong, and path or endpoint mismatches should be corrected against the official request URL first; if the call still fails, recheck that the version, headers, and JSON schema match the exact API you selected.Official resources:
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.
-
Baz Heath 5 Reputation points
Thanks for jumping in, but this question is specifically about the 2025-10-01-preview API and using the functionality that it supposedly contains. The 3.0 GA version does not contain this functionality, so using it does not resolve this issue. I am already using the 2025-10-01-preview API for every call, there is no mixing of API versions. What I really need is someone from the team who can explain the discrepancy between the documentation and the actual API contracts.
-
Sina Salam 30,166 Reputation points β’ Volunteer Moderator
Hi Baz Heath,
Thanks for your response.
Regarding your need, I will therefore escalate the thread.
However, you can contact: Priority Customer Support
Cheers.
-
Baz Heath 5 Reputation points
Thank you. As a side note: here's an example of a Microsoft dev blog that describes how this should work.
https://devblogs.microsoft.com/foundry/translation-customization-a-developers-guide-to-adaptive-custom-translation/#comments -
SRILAKSHMI C 19,110 Reputation points β’ Microsoft External Staff β’ Moderator
Hi Baz Heath,
Thank you for the clarification and youβre absolutely right to focus specifically on the 2025-10-01-preview API and the Adaptive Custom Translation (adaptCT) scenario.
Based on what youβve described and the testing youβve already completed, your understanding and implementation approach look correct. The behavior youβre seeing points to a gap between the current documentation and the actual API contract/implementation for this preview feature.
What we can confirm
The
adaptiveDatasetIdparameter is expected as a string in the API contract.However, the dataset/index creation flow currently returns an integer ID, and there is no documented transformation or mapping provided.
Passing either The numeric ID (even when cast to string), or The dataset/index name results in the
400134 - invalid adaptive dataset IDerror.What this indicates
At this time, this appears to be one of the following
The preview feature requires an internal or different identifier format that is not yet documented or exposed
There may be a missing linkage step between the dataset index and the LLM deployment before it can be used in the Translate API
Or this is a known limitation / incomplete rollout of the adaptCT + LLM integration in the preview API
Since this is a preview feature and your implementation aligns with the documentation, this needs confirmation from the product team.
I am currently engaging the internal engineering team to:
- Clarify the expected format for
adaptiveDatasetId - Confirm whether any additional configuration or binding step is required
- Validate whether this is a known issue or documentation gap
At this stage, there isnβt a reliable workaround to enable adaptCT via the preview Translate API using the dataset ID returned from the current APIs.
Thank you!
- Clarify the expected format for
-
Anshika Varshney 13,405 Reputation points β’ Microsoft External Staff β’ Moderator
Hi Baz,
Did you get any chance to review the response.
Thankyou!
Sign in to comment - Use the official Translator endpoint only:
