translate

AI-Powered Text Translation API

"Empowering Global Communication with AI-Powered Text Translation."

The AI-Powered Text Translation API offers an advanced solution for real-time multilingual translation, enabling developers to integrate highly accurate language services into their applications. Leveraging state-of-the-art AI and natural language processing (NLP), this API provides seamless support for diverse languages, breaking language barriers and enhancing global communication. It's designed for simplicity, speed, and scalability, making it ideal for businesses and developers seeking to localize their apps or services efficiently.

AI-Powered Text Translation API Features

  • Real-Time Translations: Get instant, high-accuracy translations in multiple languages, ensuring a seamless user experience across diverse regions.
  • Support for 100+ Languages: From widely spoken languages to more niche dialects, the API offers extensive coverage for global communication needs.
  • Context-Aware Translations: Uses advanced NLP to provide translations that consider context, ensuring more natural and meaningful results.
  • Scalable and Flexible: Easily integrates into various platforms and scales to accommodate the translation needs of apps, websites, and enterprise solutions.
  • Customizable Language Models: Tailor translation models to fit industry-specific terminologies or unique business needs for more relevant translations.
  • Secure and Private: Built with enterprise-grade security features, ensuring data privacy and compliance with international data protection standards.
  • Developer-Friendly: Comes with clear documentation, code samples, and SDKs for easy integration and fast deployment.
  • Regular Updates: Benefit from regular updates and improvements to the API. Stay current with the latest features, security enhancements, and performance optimizations.

These features collectively make the AI-Powered Text Translation API a versatile and robust solution for developers looking to Leveraging advanced natural language processing (NLP) and machine learning models, this API provides seamless multilingual support across various platforms. Whether you're building a global e-commerce site, a customer service chatbot, or a content management system, this API ensures smooth communication across languages and cultures.

API Authentication Key

We use API keys to authenticate all the requests. You can view and manage your API keys in the My Account -> My APIs Center page. Your API keys can be used to access our all the APIs, So be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

                                                    
                                                        XXXX-XXXX-XXXX-XXXX (login to see your free API Key) 
                                                    
                                                
Signup and activate free trial plan to try our APIs. See Trial Plan.

API Base URL and Endpoints

The API Base URL serves as the foundation or root of the API's endpoints. It represents the common prefix shared by all API endpoints. An Endpoint URL represents a specific operation or resource provided by the API. It is appended to the API Base URL to form a complete URL for a particular API call.


Base URL:

                                                
                                                    https://zerosack.org/marketplace/apis/v1 
                                                
                                            

Endpoint to translate:

                                                
                                                    POST /translate 
                                                
                                            

API Request Method POST

This API use POST HTTP method to get data from our server. All API requests must be made over HTTPS ("S" stands for secure). Calls made over plain HTTP or without authentication key will not allowed.

Request Parameters

In APIs, request parameters are values that are sent along with an API request to provide additional information or data necessary for the server to process the request correctly. These parameters are part of the URL, the request headers, or the request body, depending on the API design and the HTTP method used.

For Translation API

Parameter Description
key
required
This is your authentication api key to get requested data from our servers. This is mandatory parameter otherwise data request will be failed. Go to API Key.
input
required
This is the text that you want to translate. Maximum input length allowed: 5,000 characters. Eg: Hello, world!
target_language
required
Specifies the language you want to translate the text into. This parameter is a language code (ISO 639-1 standard). It indicates the language to which the source text will be translated. Eg: en for English. es for Spanish. hi for Hindi. See supported language codes with language names.
source_language
required
This specifies the language of the source text. Eg: en for English. See supported language codes with language names.
input_format
optional
Specifies the format of the source text. It could either be text or html (Default: text). Eg: text | html

Example Post Data Request for translate API (in Json format)

                                                    
                                                    {
    "key": "XXXX-XXXX-XXXX-XXXX (login to see your free API Key)",
    "input": "Hello World!",
    "target_language": "hi",
    "source_language": "en"
} 
                                                    
                                                

Response Format

API response format refers to the format in which data is returned from an API endpoint after a request is made. We use JSON format for API response data. JSON (JavaScript Object Notation): JSON is a lightweight data interchange format that is easy to read and write. It is widely used for API response data because it is easy to parse and manipulate in many programming languages.

Example Response

                                                    
                                                        {
                                                            "status": 1,
                                                            "status_message": "success",
                                                            "body": {
                                                                "translated_text": "हैलो वर्ल्ड!"
                                                            }
                                                        } 
                                                    
                                                

In a successful scenario "status" : 1 , a single API credit call/request is deducted from your account. However, in the event of failure or any other condition, you will receive a "status" : 0 , and in such cases, no API credit calls/requests will be counted against your account.

Sample Code

You can use our api with any programming language as well which can handle http GET requests. Here are some sample code snippets for making a GET request to an API endpoint in multiple programming languages:

JavaScript PHP Python C#
                                                            
                                                                
                                                                    var myHeaders = new Headers();
                                                                    myHeaders.append("Content-Type", "application/json");

                                                                    var postData = JSON.stringify({
                                                                        "key": "XXXX-XXXX-XXXX-XXXX (login to see your free API Key)",
                                                                        ...,
                                                                        ...
                                                                    });

                                                                    var requestOptions = {
                                                                        method: "POST",
                                                                        headers: myHeaders,
                                                                        body: postData
                                                                    };

                                                                    fetch("https://zerosack.org/marketplace/apis/v1/translate", requestOptions)
                                                                    .then(response => response.json())
                                                                    .then(result => console.log(result))
                                                                    .catch(error => console.log("error", error));
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    $curl = curl_init();

                                                                    $postData = json_encode(
                                                                        [
                                                                            "key" => "XXXX-XXXX-XXXX-XXXX (login to see your free API Key)", 
                                                                            ...,
                                                                            ... 
                                                                         ]
                                                                    );
                                                                    
                                                                    curl_setopt_array($curl, array(
                                                                    CURLOPT_URL => "https://zerosack.org/marketplace/apis/v1/translate",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => $postData,
                                                                    CURLOPT_HTTPHEADER => array("Content-Type: application/json"),
                                                                    ));
                                                                    
                                                                    $response = curl_exec($curl);
                                                                    
                                                                    curl_close($curl);
                                                                    echo $response;
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    import requests
                                                                    import json
                                                                    
                                                                    url = "https://zerosack.org/marketplace/apis/v1/translate"
                                                                    
                                                                    payload = json.dumps({
                                                                        "key": "XXXX-XXXX-XXXX-XXXX (login to see your free API Key)",
                                                                        ...,
                                                                        ...
                                                                    })
                                                                    
                                                                    headers = {"Content-Type": "application/json"}
                                                                    
                                                                    response = requests.request("POST", url, headers=headers, data=payload)
                                                                    
                                                                    print(response.text)
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    var client = new HttpClient();
                                                                    var request = new HttpRequestMessage(HttpMethod.Post, "https://zerosack.org/marketplace/apis/v1/translate");
                                                                    request.Headers.Add("Cookie", "PHPSESSID=st6pbm0imcng6n3k8ju6pvg3j3");
                                                                    var content = new StringContent("{\r\n    \"key\": \"XXXX-XXXX-XXXX-XXXX (login to see your free API Key)\",\r\n    ...,      ...}", null, "application/json");
                                                                    request.Content = content;
                                                                    var response = await client.SendAsync(request);
                                                                    response.EnsureSuccessStatusCode();
                                                                    Console.WriteLine(await response.Content.ReadAsStringAsync());                                                                                                                                
                                                                 
                                                            
                                                        

Also you can use Postman platform which enables you to create mock servers to assist with API development and testing. A mock server simulates the behavior of a real API server by accepting requests and returning responses. By adding a mock server to your collection and adding examples to your requests, you can simulate the behavior of a real API.

Do you Need Help? Contact us.

Disclaimers: This APIs is provided "as is" without warranty of any kind. If you have issue / feedback / bug report regarding the same, You can reach out to us.