API Reference

Text Translation · REST

POSThttps://api.shabd.tech/v1/text-translate

Transforms text between languages or adapts it to different styles while preserving meaning and context. Delivers precise, reliable results for translation, localization, and content adaptation.

Headers

  • x-api-keystringrequired

    API Key for authentication

    Example:
    <your-api-key>
  • Content-Typestringrequired

    Content type of the request body

    Example:
    application/json
  • x-request-idstringrequired

    Unique request ID in UUID format

    Example:
    550e8400-e29b-41d4-a716-446655440000

Request bodyapplication/json

  • textstringrequired

    Text to translate

    Example:
    Enter text in any script and get the translation in your desired language.
  • sourceLanguagestringrequired

    Source language of the text

    Example:
    english
  • targetLanguagestringrequired

    Target language for translation

    Example:
    tamil
  • stylestringoptional

    Translation style ("conversational" or "formal")

    Allowed:
    conversational
    formal
    Default:
    conversational
  • projectIdstringoptional

    Optional project identifier

    Example:
    <your-project-id-here>

Responses

  • 200Translated text

    Bodyapplication/json

    • statusbooleanoptional
      Example:
      true
    • textstringoptional
      Example:
      எந்தவொரு ஸ்கிரிப்டிலும் உரையை உள்ளிட்டு, நீங்கள் விரும்பும் மொழியில் மொழிபெயர்ப்பைப் பெறுங்கள்.

    Example response

    {  "status": true,  "text": "எந்தவொரு ஸ்கிரிப்டிலும் உரையை உள்ளிட்டு, நீங்கள் விரும்பும் மொழியில் மொழிபெயர்ப்பைப் பெறுங்கள்."}
  • 400Bad Request - The request is malformed or contains invalid parameters.

    Bodyapplication/json

    • statusbooleanoptional
      Example:
      false
    • messagestringoptional
      Example:
      Invalid input parameters.

    Example response

    {  "status": false,  "message": "Invalid input parameters."}
  • 401Unauthorized Access - Authentication credentials are missing or invalid.

    Bodyapplication/json

    • statusbooleanoptional
      Example:
      false
    • messagestringoptional
      Example:
      Unauthorized access.

    Example response

    {  "status": false,  "message": "Unauthorized access."}
  • 403Usage Limit Exceeded - The usage limit for the API has been exceeded.

    Bodyapplication/json

    • statusbooleanoptional
      Example:
      false
    • messagestringoptional
      Example:
      Limit Exceeded

    Example response

    {  "status": false,  "message": "Limit Exceeded"}
  • 500Internal server error

    Bodyapplication/json

    • statusbooleanoptional
      Example:
      false
    • messagestringoptional
      Example:
      An unexpected error occurred. Please try again later.

    Example response

    {  "status": false,  "message": "An unexpected error occurred. Please try again later."}