RiemannAI Developers.

Our does our API work?

Whether you are just learning to code, an experienced developer, or a student wanting to create simplified versions of text to read, the RiemannAI API is for you! All endpoints are completely free for any use case. In order for us to continue providing this service, please do not make spam or unnecessarily large numbers of requests to any API endpoint.

Extractive Summarization

We provide an endpoint that allows for extractive summarization. Extractive summarization keeps important sentences and cuts out other ones from the original piece of text.

Note: Please use JSON.stringify() before sending data over to this API endpoint. Only english is supported for extractive summarization.

POST/api/extractive-summarization

Headers:

  • pKeep: The proportion of sentences to take from the original text for the summary, out of 1.

Body:

  • origText: The original piece of text.

Example:

const options = { method: "POST", headers: { pkeep: pKeep, }, body: JSON.stringify({ origText: origText }), }; const resp = await fetch("/api/extractive-summarization", options); const data = await resp.json();

Abstractive Summarization

We provide an endpoint that allows for abstractive summarization. Abstractive summarization uses deep learning to understand a piece of text, and returns the desired portions.

Note: Please use JSON.stringify() before sending data over to this API endpoint. Only english is supported for abstractive summarization.

POST/api/abstractive-summarization

Body:

  • origText: The original piece of text.
  • numBullets: The number of bullet points to return in the summary.
  • question: The question you want to ask the API. Use "N/A" if not desired.

Example:

const options = { method: "POST", body: JSON.stringify({ origText, question: useQ, numBullets, }), }; const resp = await fetch("/api/abstractive-summarization", options); const data = await resp.json();

Multiple Language Summarization

We provide an endpoint that allows for extractive summarization in different languages. For a list of supported languages, please visit Azure's documenation.

Note: Please use JSON.stringify() before sending data over to this API endpoint.

POST/api/lang-summarization

Headers:

  • lang: The language code of the input text. For a list of available languages, please visit the above link to Azure's documenation.

Body:

  • origText: The original piece of text in any supported language.

Example:

const options = { method: "POST", headers: { lang: "en", }, body: JSON.stringify({ origText: origText }), }; const resp = await fetch("/api/lang-summarization", options); const data = await resp.json();