Lilt API binding for java
All URIs are relative to https://api.lilt.com
Method | HTTP request | Description |
---|---|---|
deleteLiltCreateContent | DELETE /v2/create/{contentId} | Delete Lilt Create content |
generateLiltCreateContent | POST /v2/create | Generate new Lilt Create content |
getLiltCreateById | GET /v2/create/{contentId} | Get Lilt Create content by ID. |
getLiltCreateContent | GET /v2/create | Get Lilt Create content |
getLiltCreatePreferences | GET /v2/create/preferences | Get Lilt Create preferences |
regenerateLiltCreateContent | GET /v2/create/{contentId}/create | Regenerate Lilt Create content |
signLiltCreateTerms | POST /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions |
updateLiltCreateContent | PUT /v2/create/{contentId} | Update Lilt Create content |
updateLiltCreatePreferences | PUT /v2/create/preferences | Update Lilt Create preferences |
InlineResponse200 deleteLiltCreateContent(contentId)
Delete Lilt Create content
Delete a piece of Lilt Create content. Example CURL: ```bash curl -X DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
Integer contentId = 56; // Integer | The content ID.
try {
InlineResponse200 result = apiInstance.deleteLiltCreateContent(contentId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#deleteLiltCreateContent");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
contentId | Integer | The content ID. |
| Status code | Description | Response headers | |————-|————-|——————| 200 | The Delete Lilt Create Content Response. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
generateLiltCreateContent(templateParams)
Generate new Lilt Create content
Generate new Lilt Create content with the given parameters. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
LiltCreateContentRequest templateParams = new LiltCreateContentRequest(); // LiltCreateContentRequest | Input parameters that determine what content will be generated.
try {
apiInstance.generateLiltCreateContent(templateParams);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#generateLiltCreateContent");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateParams | LiltCreateContentRequest | Input parameters that determine what content will be generated. |
null (empty response body)
| Status code | Description | Response headers | |————-|————-|——————| 200 | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
LiltCreateContent getLiltCreateById(contentId)
Get Lilt Create content by ID.
Get Lilt Create content by ID. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
Integer contentId = 56; // Integer | The content ID.
try {
LiltCreateContent result = apiInstance.getLiltCreateById(contentId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#getLiltCreateById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
contentId | Integer | The content ID. |
| Status code | Description | Response headers | |————-|————-|——————| 200 | The Lilt Create content. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
GetLiltCreateContentResponse getLiltCreateContent()
Get Lilt Create content
Get a list of all content that has been generated by Lilt Create. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create?key=API_KEY' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
try {
GetLiltCreateContentResponse result = apiInstance.getLiltCreateContent();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#getLiltCreateContent");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
| Status code | Description | Response headers | |————-|————-|——————| 200 | An object with a documents next task Workflow metadata. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
getLiltCreatePreferences()
Get Lilt Create preferences
Get the stored preferences for Lilt Create. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
try {
apiInstance.getLiltCreatePreferences();
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#getLiltCreatePreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
null (empty response body)
| Status code | Description | Response headers | |————-|————-|——————| 200 | An object describing the stored preferences. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
regenerateLiltCreateContent(contentId)
Regenerate Lilt Create content
Regenerate the given piece of content with the current parameters. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
Integer contentId = 56; // Integer | The content ID.
try {
apiInstance.regenerateLiltCreateContent(contentId);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#regenerateLiltCreateContent");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
contentId | Integer | The content ID. |
null (empty response body)
| Status code | Description | Response headers | |————-|————-|——————| 200 | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
SignLiltCreateTermsResponse signLiltCreateTerms(signedAgreement)
Sign the Lilt Create terms and conditions
Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"signedAgreement\": true}' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
CreateConverterConfigParameters signedAgreement = new CreateConverterConfigParameters(); // CreateConverterConfigParameters |
try {
SignLiltCreateTermsResponse result = apiInstance.signLiltCreateTerms(signedAgreement);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#signLiltCreateTerms");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
signedAgreement | CreateConverterConfigParameters |
| Status code | Description | Response headers | |————-|————-|——————| 200 | An object indicating whether the agreement has been signed or not. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
LiltCreateContent updateLiltCreateContent(contentId, body)
Update Lilt Create content
Update a piece of Lilt Create content. Example CURL: ```bash curl -X PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"language\":\"de-DE\"}' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
Integer contentId = 56; // Integer | The content ID.
LiltCreateContent body = new LiltCreateContent(); // LiltCreateContent |
try {
LiltCreateContent result = apiInstance.updateLiltCreateContent(contentId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#updateLiltCreateContent");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
contentId | Integer | The content ID. | |
body | LiltCreateContent | [optional] |
| Status code | Description | Response headers | |————-|————-|——————| 200 | The updated Lilt Create content. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |
updateLiltCreatePreferences(styleguide)
Update Lilt Create preferences
Update the stored preferences for Lilt Create. Example CURL: ```bash curl -X PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ```
// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lilt.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CreateApi apiInstance = new CreateApi(defaultClient);
LiltCreateContent styleguide = new LiltCreateContent(); // LiltCreateContent | Which styleguide to use.
try {
apiInstance.updateLiltCreatePreferences(styleguide);
} catch (ApiException e) {
System.err.println("Exception when calling CreateApi#updateLiltCreatePreferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
styleguide | LiltCreateContent | Which styleguide to use. | [optional] |
null (empty response body)
| Status code | Description | Response headers | |————-|————-|——————| 200 | The updated Lilt Create preferences. | - | 401 | Unauthorized | - | 0 | Unexpected error | - |