lilt-python

API bindings for the Lilt REST API.

View the Project on GitHub lilt/lilt-python

lilt.CreateApi

All URIs are relative to https://api.lilt.com

Method HTTP request Description
delete_lilt_create_content DELETE /v2/create/{contentId} Delete Lilt Create content
generate_lilt_create_content POST /v2/create Generate new Lilt Create content
get_lilt_create_by_id GET /v2/create/{contentId} Get Lilt Create content by ID.
get_lilt_create_content GET /v2/create Get Lilt Create content
get_lilt_create_preferences GET /v2/create/preferences Get Lilt Create preferences
regenerate_lilt_create_content GET /v2/create/{contentId}/create Regenerate Lilt Create content
sign_lilt_create_terms POST /v2/create/terms-and-conditions Sign the Lilt Create terms and conditions
update_lilt_create_content PUT /v2/create/{contentId} Update Lilt Create content
update_lilt_create_preferences PUT /v2/create/preferences Update Lilt Create preferences

delete_lilt_create_content

DeleteLiltCreateContent200Response delete_lilt_create_content(content_id)

Delete Lilt Create content

Delete a piece of Lilt Create content.

Example CURL:

curl -X DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY'

Example

import lilt
from lilt.models.delete_lilt_create_content200_response import DeleteLiltCreateContent200Response
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    content_id = 56 # int | The content ID.

    try:
        # Delete Lilt Create content
        api_response = api_instance.delete_lilt_create_content(content_id)
        print("The response of CreateApi->delete_lilt_create_content:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CreateApi->delete_lilt_create_content: %s\n" % e)

Parameters

Name Type Description Notes
content_id int The content ID.  

Return type

DeleteLiltCreateContent200Response

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 The Delete Lilt Create Content Response. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

generate_lilt_create_content

generate_lilt_create_content(template_params)

Generate new Lilt Create content

Generate new Lilt Create content with the given parameters.

Example CURL:

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":""}
}'

Example

import lilt
from lilt.models.lilt_create_content_request import LiltCreateContentRequest
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    template_params = lilt.LiltCreateContentRequest() # LiltCreateContentRequest | Input parameters that determine what content will be generated. 

    try:
        # Generate new Lilt Create content
        api_instance.generate_lilt_create_content(template_params)
    except Exception as e:
        print("Exception when calling CreateApi->generate_lilt_create_content: %s\n" % e)

Parameters

Name Type Description Notes
template_params LiltCreateContentRequest Input parameters that determine what content will be generated.  

Return type

void (empty response body)

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

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 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_lilt_create_by_id

LiltCreateContent get_lilt_create_by_id(content_id)

Get Lilt Create content by ID.

Get Lilt Create content by ID.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create/1234?key=API_KEY'

Example

import lilt
from lilt.models.lilt_create_content import LiltCreateContent
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    content_id = 56 # int | The content ID.

    try:
        # Get Lilt Create content by ID.
        api_response = api_instance.get_lilt_create_by_id(content_id)
        print("The response of CreateApi->get_lilt_create_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CreateApi->get_lilt_create_by_id: %s\n" % e)

Parameters

Name Type Description Notes
content_id int The content ID.  

Return type

LiltCreateContent

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 The Lilt Create content. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_lilt_create_content

GetLiltCreateContentResponse get_lilt_create_content()

Get Lilt Create content

Get a list of all content that has been generated by Lilt Create.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create?key=API_KEY'

Example

import lilt
from lilt.models.get_lilt_create_content_response import GetLiltCreateContentResponse
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)

    try:
        # Get Lilt Create content
        api_response = api_instance.get_lilt_create_content()
        print("The response of CreateApi->get_lilt_create_content:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CreateApi->get_lilt_create_content: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetLiltCreateContentResponse

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 An object with a documents next task Workflow metadata. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_lilt_create_preferences

get_lilt_create_preferences()

Get Lilt Create preferences

Get the stored preferences for Lilt Create.

Example CURL:

curl -X POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY'

Example

import lilt
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)

    try:
        # Get Lilt Create preferences
        api_instance.get_lilt_create_preferences()
    except Exception as e:
        print("Exception when calling CreateApi->get_lilt_create_preferences: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 An object describing the stored preferences. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

regenerate_lilt_create_content

regenerate_lilt_create_content(content_id)

Regenerate Lilt Create content

Regenerate the given piece of content with the current parameters.

Example CURL:

curl -X GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY'

Example

import lilt
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    content_id = 56 # int | The content ID.

    try:
        # Regenerate Lilt Create content
        api_instance.regenerate_lilt_create_content(content_id)
    except Exception as e:
        print("Exception when calling CreateApi->regenerate_lilt_create_content: %s\n" % e)

Parameters

Name Type Description Notes
content_id int The content ID.  

Return type

void (empty response body)

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

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 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

sign_lilt_create_terms

SignLiltCreateTermsResponse sign_lilt_create_terms(signed_agreement)

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:

curl -X POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"signedAgreement": true}'

Example

import lilt
from lilt.models.create_converter_config_parameters import CreateConverterConfigParameters
from lilt.models.sign_lilt_create_terms_response import SignLiltCreateTermsResponse
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    signed_agreement = lilt.CreateConverterConfigParameters() # CreateConverterConfigParameters | Whether or not to sign the agreement.

    try:
        # Sign the Lilt Create terms and conditions
        api_response = api_instance.sign_lilt_create_terms(signed_agreement)
        print("The response of CreateApi->sign_lilt_create_terms:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CreateApi->sign_lilt_create_terms: %s\n" % e)

Parameters

Name Type Description Notes
signed_agreement CreateConverterConfigParameters Whether or not to sign the agreement.  

Return type

SignLiltCreateTermsResponse

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 An object indicating whether the agreement has been signed or not. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_lilt_create_content

LiltCreateContent update_lilt_create_content(content_id, body=body)

Update Lilt Create content

Update a piece of Lilt Create content.

Example CURL:

curl -X PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"language":"de-DE"}'

Example

import lilt
from lilt.models.lilt_create_content import LiltCreateContent
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    content_id = 56 # int | The content ID.
    body = lilt.LiltCreateContent() # LiltCreateContent |  (optional)

    try:
        # Update Lilt Create content
        api_response = api_instance.update_lilt_create_content(content_id, body=body)
        print("The response of CreateApi->update_lilt_create_content:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CreateApi->update_lilt_create_content: %s\n" % e)

Parameters

Name Type Description Notes
content_id int The content ID.  
body LiltCreateContent   [optional]

Return type

LiltCreateContent

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 The updated Lilt Create content. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_lilt_create_preferences

update_lilt_create_preferences(styleguide=styleguide)

Update Lilt Create preferences

Update the stored preferences for Lilt Create.

Example CURL:

curl -X PUT
'https://api.lilt.com/v2/create/preferences?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"tone": "formal", "styleguide": ""}'

Example

import lilt
from lilt.models.lilt_create_content import LiltCreateContent
from lilt.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lilt.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
    host = "https://api.lilt.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lilt.CreateApi(api_client)
    styleguide = lilt.LiltCreateContent() # LiltCreateContent | Which styleguide to use. (optional)

    try:
        # Update Lilt Create preferences
        api_instance.update_lilt_create_preferences(styleguide=styleguide)
    except Exception as e:
        print("Exception when calling CreateApi->update_lilt_create_preferences: %s\n" % e)

Parameters

Name Type Description Notes
styleguide LiltCreateContent Which styleguide to use. [optional]

Return type

void (empty response body)

Authorization

BasicAuth, ApiKeyAuth

HTTP request headers

HTTP response details

Status code Description Response headers
200 The updated Lilt Create preferences. -
401 Unauthorized -
0 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]