Using AI

The Tailwind block allows communicating with a GPT to generate Tailwind HTML, which can then be converted to blocks.

API key

OpenRouter allows interacting with various GPTs via a single API.

First, set up your OpenRouter.ai API key and model under ska-blocks -> Options -> AI:

Models can be found at OpenRouter -> Models, for example, for the free Dolphin3.0 Mistral 24B model you should enter cognitivecomputations/dolphin3.0-mistral-24b:free to the OpenRouter model option.

Add Tailwind block

Add the Tailwind block and press “AI” on the toolbar:

Choose a suggestion or write a prompt:

Once the GPT has returned a response, it’s output will be inserted to the Tailwind block:

You can switch to the Preview tab to see what the HTML looks like when rendered:

Results may vary depending on the model used.

To make modifications you can press the AI button again to continue the session.

Once you’re happy with the result you can press Convert to blocks:

Alternatives

You can also use any other AI chat service to have it generate Tailwind HTML for you and simply manually paste it to the Tailwind block to convert it to blocks.