Java Client

Step 1 - Add the Client with the Package Manager

Add the Java client to your Maven POM file:

Add a reference to the repository (we use Jitpack to dynamically compile the library from Github source):


Add a reference to the dependency:


Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		maven { url '' }

Add the dependency:

dependencies {
        implementation 'com.github.Cloudmersive:Cloudmersive.APIClient.Java:v3.34'

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .java file:

import com.cloudmersive.client.invoker.ApiClient;
import com.cloudmersive.client.invoker.ApiException;
import com.cloudmersive.client.invoker.Configuration;
import com.cloudmersive.client.invoker.auth.*;
import com.cloudmersive.client.ConvertDocumentApi;

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

ApiClient defaultClient = Configuration.getDefaultApiClient();

ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");

Step 3 - Call an API

Let's try calling the email validation API to check if this email address exists:
ConvertDocumentApi apiInstance = new ConvertDocumentApi();
File inputFile = new File("C:\\temp\\input.docx"); // File | Input file to perform the operation on.
try {
    byte[] result = apiInstance.convertDocumentDocxToPdf(inputFile);
} catch (ApiException e) {
    System.err.println("Exception when calling ConvertDocumentApi#convertDocumentDocxToPdf");

Sample Application

Download Console Sample or Download Android Sample

You can also download our sample application from GitHub.

1,000 free API calls/month, no credit card required

Get started now!