v1

latestOpenAPI 3.1.02026-07-265094114.0 KB
Templates

Run template

Run a default template or custom template by ID to generate an AI output. See our guide on Using Templates for tips on getting started.

post/v1/templates/{templateId}/run

Path parameters

templateIdstring required
Example:skl_501CFB66C00F47ECA277BF4ECC99DD21

The template's unique ID

Request body

Example request

{
  "inputs": {
    "toneId": "ton_2ee766eaa4ef48e59da1d9602bfecf2d",
    "styleId": "sty_2ee766eaa4ef48e59da1d9602bfecf2d",
    "audienceId": "aud_2ee766eaa4ef48e59da1d9602bfecf2d",
    "additionalAudienceIds": [
      "aud_7c1f0b9d2e4a4f6b8d3c5a1e9f0b2c4d",
      "aud_3a9e5d1c8b7f4062a1d3e6c9b0f8a2e7"
    ]
  },
  "options": {
    "outputCount": 3,
    "outputLanguage": "English",
    "inputLanguage": "English",
    "languageFormality": "default",
    "webScraper": {
      "urls": [
        "https://en.wikipedia.org/wiki/Rabbit",
        "https://en.wikipedia.org/wiki/Lagomorpha"
      ]
    },
    "webSearch": {
      "siteBlockList": [
        "https://en.wikipedia.org"
      ],
      "searchQuery": "Recent bear attacks in Alaska"
    }
  }
}

Response

Generate outputs for a specific template

requestIdstring
resourcestring

Example response

{
  "requestId": "bce766ea-a4ef-48e5-9da1-d9602bfecf2d",
  "resource": "content",
  "data": [
    {
      "text": "\n\nFurry friends so sweet,\nNibbling on fresh kale leaves,\nSoft hops fill the breeze.",
      "id": "txt_bce766eaa4ef48e59da1d9602bfecf2d"
    }
  ]
}