Lilt Create API

The Create API from Lilt — 2 operation(s) for create.

OpenAPI Specification

lilt-create-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: LILT Create API
  description: "LILT API Support: https://lilt.atlassian.net/servicedesk/customer/portals\n\nThe LILT API enables programmatic access to the full-range of LILT backend services including:\n  * Training of and translating with interactive, adaptive machine translation\n  * Large-scale translation memory\n  * The Lexicon (a large-scale termbase)\n  * Programmatic control of the LILT CAT environment\n  * Translation memory synchronization\n\n\nRequests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.\n\nThe base url for this REST API is `https://api.lilt.com/`.\n\n## Authentication\n\nRequests are authenticated via API key, which requires the Business plan.\n\nRequests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your API key as both the `username` and `password`.\n\nFor development, you may also pass the API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.\n\n## Quotas\n\nOur services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request.\n"
  version: v3.0.3
  license:
    name: LILT Platform Terms and Conditions
    url: https://lilt.com/lilt-platform-terms-and-conditions
servers:
- url: https://api.lilt.com
security:
- BasicAuth: []
- ApiKeyAuth: []
tags:
- name: Create
paths:
  /v2/create:
    get:
      tags:
      - Create
      summary: Get Lilt Create content
      description: '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''

        ```


        '
      operationId: getLiltCreateContent
      responses:
        '200':
          description: An object with a documents next task Workflow metadata.
          content:
            application/json:
              schema:
                title: getLiltCreateContentResponse
                type: object
                properties:
                  contents:
                    type: array
                    description: List of LiltCreateContent objects
                    items:
                      $ref: '#/components/schemas/LiltCreateContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Create
      summary: Generate new Lilt Create content
      description: "Generate new Lilt Create content with the given parameters.\n\nExample CURL:\n```bash\ncurl -X POST 'https://api.lilt.com/v2/create?key=API_KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"language\":\"en-US\",\n  \"template\":\"blog-post\",\n  \"templateParams\":{\n    \"contentLength\":\"100\",\n    \"language\":\"en-US\",\n    \"sections\":[],\n    \"summary\":\"a blog post about hiking\"\n    },\n  \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"}\n}'\n```\n\n"
      operationId: generateLiltCreateContent
      requestBody:
        description: 'Input parameters that determine what content will be generated.

          '
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiltCreateContentRequest'
        required: true
      responses:
        '200':
          description: '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

            '
          content: {}
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codegen-request-body-name: templateParams
  /v2/create/{contentId}:
    get:
      tags:
      - Create
      summary: Get Lilt Create content by ID.
      description: 'Get Lilt Create content by ID.


        Example CURL:

        ```bash

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

        ```


        '
      operationId: getLiltCreateById
      parameters:
      - name: contentId
        in: path
        description: The content ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: The Lilt Create content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiltCreateContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
      - Create
      summary: Update Lilt Create content
      description: '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"}''

        ```


        '
      operationId: updateLiltCreateContent
      parameters:
      - name: contentId
        in: path
        description: The content ID.
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiltCreateContent'
        required: false
      responses:
        '200':
          description: The updated Lilt Create content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiltCreateContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codegen-request-body-name: body
    delete:
      tags:
      - Create
      summary: Delete Lilt Create content
      description: 'Delete a piece of Lilt Create content.


        Example CURL:

        ```bash

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

        ```


        '
      operationId: deleteLiltCreateContent
      parameters:
      - name: contentId
        in: path
        description: The content ID.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: The Delete Lilt Create Content Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: The ID of the deleted Lilt Create content.
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LiltCreateContent:
      type: object
      required:
      - language
      - template
      - templateParams
      properties:
        name:
          type: string
          description: A name for the request content.
        id:
          type: integer
          description: A unique identifier for the generated content.
        language:
          type: string
          description: The language of the content.
        template:
          type: string
          description: The template of the content.
        templateParams:
          type: object
          description: The template parameters of the content.
          required:
          - language
          properties:
            contentLength:
              type: integer
              description: The length of the content.
            memoryId:
              type: integer
              description: The ID referencing a Data Source.
            language:
              type: string
              description: The language of the content.
            sections:
              type: array
              description: The sections of the content.
              items:
                type: string
                description: A section heading of the content.
            summary:
              type: string
              description: The summary of the content.
        preferences:
          type: object
          description: The preferences of the content.
          properties:
            tone:
              type: string
              description: The tone of the content.
            styleguide:
              type: string
              description: The styleguide of the content.
      description: 'Content Parameters for LiltCreate.

        '
    Error:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message describing the error.
      description: 'Response in the event of an unexpected error.

        '
      example:
        message: Internal server error.
    LiltCreateContentRequest:
      type: object
      required:
      - language
      - template
      - templateParams
      properties:
        name:
          type: string
          description: A name for the request content.
        language:
          type: string
          description: The language of the content.
        template:
          type: string
          description: The template of the content.
        templateParams:
          type: object
          description: The template parameters of the content.
          required:
          - language
          properties:
            contentLength:
              type: integer
              description: The length of the content.
            memoryId:
              type: integer
              description: The ID referencing a Data Source.
            language:
              type: string
              description: The language of the content.
            sections:
              type: array
              description: The sections of the content.
              items:
                type: string
                description: A section heading of the content.
            summary:
              type: string
              description: The summary of the content.
        preferences:
          type: object
          description: The preferences of the content.
          properties:
            tone:
              type: string
              description: The tone of the content.
            styleguide:
              type: string
              description: The styleguide of the content.
      description: 'Content Parameters for LiltCreate.

        '
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/octet-stream:
          schema:
            type: string
        text/plain:
          schema:
            type: string
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    ApiKeyAuth:
      type: apiKey
      name: key
      in: query