Synchronous REST API Call for Azure AI Language Text Summarization

briancodey-9197 20 Reputation points
2025-11-11T17:28:18.7033333+00:00

https://learn.microsoft.com/en-us/azure/ai-services/language-service/summarization/how-to/text-summarization?source=recommendations

The instruction provided from Microsoft documentation had two steps processes (a POST and a GET). The POST would provide the "operation-location", and we need to extract it to do a second GET to retrieve the summarized text. The "operation-location" GET always ran in async mode.

Async mode is useful for large documents and for uploading files process. It is not ideal for implementing Summarization for shorter text.

I am looking for a method to get the summarized text (either Abstractive or Extractive) synchronously. Microsoft documents for AI Language did not provide any information on calling synchronously. Copilot search returned non-working suggestions.

Any help is greatly appreciated.

Thanks,

Brian Codey

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Q&A Assist
    2025-11-11T17:28:35.22+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Currently, the Azure AI Language service for text summarization primarily operates in an asynchronous mode, as you've noted. The typical workflow involves making a POST request to initiate the summarization process, which returns an "operation-location" that you must use in a subsequent GET request to retrieve the results. Unfortunately, the documentation does not provide a synchronous method for obtaining summaries directly.

    For shorter texts, while the asynchronous approach may seem less ideal, it is the only supported method at this time. If you are looking for a synchronous-like experience, you might consider implementing a polling mechanism that checks the status of the operation immediately after the POST request, but this would still be fundamentally asynchronous.

    If you need immediate results for very short texts, you might explore alternative summarization libraries or services that support synchronous calls, but these would not be part of the Azure AI Language service offerings.


    References:

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.