Advanced Text Translator

Automates translation into 80 languages with customizable writing styles and context for multilingual applications.

The Text Translation API translates text into any of the 80 supported languages, providing accurate and context-aware translations.

This API is perfect for developers building multilingual applications or content management systems. It automates text translation, enhancing user experience by providing content in their preferred language. Use cases include translating website content, localizing software applications, and enabling real-time language translation for customer support and communication tools.

You can set your preferred writing style by providing a voice_tone parameter.

It can be adjectives like funny or joyous, or even the name of a famous writer.

An optional context parameter is also available. It can be used to provide more context to the translated text, like the use case example or some additional explanations.

AI jobs involve two key steps::

  1. Submitting the AI job: Initiating the process by sending the job request.
  2. Monitoring and receiving results: Continuously checking the job status and obtaining the final output upon successful completion.

Step 1. Submit the AI Job request

Endpoint: POST - /api/v1/content/translate

Attribute Type Mandatory Description
content String Yes Provide the content to translate.
language String No Specify the language of the content which needs to be translated. Eg. 'German'
voice_tone String No Specify the voice tone of the output. It can be adjectives like funny or joyous, or even the name of a famous writer.
context String No Provide additional context to the translated text, such as use case examples or additional explanations.

REQUEST EXAMPLE:

{
  "content": "La montée du niveau de la mer menace d'engloutir les Maldives où l'eau douce commence déjà à manquer, mais le nouveau président de l'archipel de l'océan Indien refuse toute relocalisation de sa population à l'étranger. Dans un entretien à l'AFP, le président Mohamed Muizzu, un ingénieur du génie civil de 45 ans, formé au Royaume-Uni, promet au contraire un ambitieux programme de réhabilitation des terres et de surélévation des îles, que critiquent des organisations environnementales.",
  "language": "English",
  "voice_tone": "neutral",
  "context": null
}

RESPONSE EXAMPLE:

{
  "status_url": "https://sharpapi.com/api/v1/content/translate/job/status/5de4887a-0dfd-49b6-8edb-9280e468c210",
  "job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}

Step 2. Monitor & Fetch AI Job Results

Endpoint: GET - /api/v1/content/translate/job/status/:uuid

An endpoint is used to check on the progress of the requested API job.

RESULT EXAMPLE:

{
  "data": {
    "type": "api_job_result",
    "id": "5de4887a-0dfd-49b6-8edb-9280e468c210",
    "attributes": {
      "status": "success",
      "type": "content_translate",
      "result": {
        "content": "The rise in sea levels threatens to engulf the Maldives where fresh water is already starting to run out, but the new president of the Indian Ocean archipelago refuses any relocation of its population abroad. In an interview with AFP, President Mohamed Muizzu, a 45-year-old civil engineering graduate trained in the United Kingdom, instead promises an ambitious program of land rehabilitation and island elevation, which environmental organizations criticize.",
        "to_language": "English",
        "from_language": "French"
      }
    }
  }
}
When Laravel/PHP E-commerce App Meets AI

When Laravel/PHP E-commerce App Meets AI

Jan 1, 2024

Hey fellow Laravel enthusiasts! In the ever-evolving landscape of e-commerce, integrating AI into your Laravel applications is not just a luxury, it’s a necessity. With SharpAPI’s Laravel package, it’s now easier than ever. In this blog, I’ll guide you through 10 transformative use cases for enhancing your Laravel-based e-commerce applications using SharpAPI.