Skip to main content

Create Content

LILT Create offers an alternative to normal translation, by allowing you to generate content in the target language using various prompts to get your message across more organically in the new language. This can make your content easier to understand for users of that language and can empower a global audience. This guide will demonstrate how to:

Things you will need:

  • API Key - All requests throughout the LILT API use the API Key to authenticate.

Signing the Terms and Conditions

In order to use LILT Create a user must first agree to the terms and conditions found here: https://lilt.com/lilt-create-license-terms

The API has an endpoint that you can use to agree to these terms and conditions by making the following request (Please read the License terms before making this call).

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

The response will be the same data you sent with a 200 status. You are ready to Create!

Generate Content

There are a few things to consider before Generating Content:

  1. What do I want to generate? This can be as simple as "Write a story about bees" or "Write a paragraph about product X". As long as your prompt is below the character limit of 500.
  2. How do I want to group the content to be generated? Writing an article that is split into multiple sections with different headings, add sections to structure the generated content.
  3. Do I want to use Terminology specific to my organization? Add a memoryId to the request. See the API docs for more info.

Below is an example request to generate content in English.

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":"1000",
"language":"en-US",
"sections":["Bees and me","Honey for you", "Conclusion"],
"summary":"a blog post about how important bees are to my honey farm"
},
"preferences":{"tone":"formal","styleguide":""}
}'

The response is an event stream of the generated content. You can choose to read the stream, or you can choose to wait until a DONE message is emitted. Try it out with something that makes sense for your organization or a different language you are proficient with.

Get Generated Content

As you Create more it might become necessary to get content you already generated previously. Currently, it is only possible to get a complete list of everything you have created previously using this endpoint:

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

Notes

There are additional features associated with LILT Create such as creating/storing preferences for re-use, Regenerating from an existing prompt, and various other management endpoints. These calls can be found in the API Specification.