diff --git a/docs/deploy-to-api.md b/docs/deploy-to-api.md index 79a5ffeb32..9c14d6bdb4 100644 --- a/docs/deploy-to-api.md +++ b/docs/deploy-to-api.md @@ -2,7 +2,7 @@ ## Overview -Deploy to API enables you to transform your workflows into production-ready APIs, allowing you to seamlessly integrated advanced AI capabilities into your app quickly. +`Deploy to API` enables you to transform your workflows into production-ready APIs, allowing you to seamlessly integrated advanced AI capabilities into your app quickly. - **Scalability:** Your deployment will be able to handle increasing loads without compromising performance. - **Accessibility:** Simplify the arduous process of deploying an AI workflow, and enable production-ready use with the click of a button. @@ -10,21 +10,23 @@ Deploy to API enables you to transform your workflows into production-ready APIs ## Deploying to API -1. Once your workflow is ready for production use, navigate to the deploy button in the workflow editor. -2. Select the "Deploy to API" option. +1. Once your workflow is ready for production use, navigate to the `Deploy` button in the workflow editor. +2. Select the `Deploy to API` option. 3. You will receive a unique endpoint that you can execute via CURL. -## Sending Inputs +![deployments1](images/deployments1.png) -### Example cURL Request +## Sending inputs + +### Example cURL request ``` -curl -X POST --location "" \\ +curl -X POST --location "" \\ -H "Content-Type: application/json" \\ -d '{ "callback": "" }' ``` -### Example Request Body +### Example request body ```json { @@ -48,26 +50,25 @@ When the CURL command and the respective object are executed, you will receive t } ``` -## Salt Input Node +## SaltInput node -The Salt Input Node is an official node developed by the Salt team. This node allows you to expose input parameters of your workflow for end user consumption. +The `SaltInput` node is an official node developed by the Salt team. Each one present in the workflow allows you to expose input parameters for the end user to interact with. -### Supported Value Types +### Supported value types -- RAW Types: Strings, Integers, Float, Boolean -- Reference Types: URLs -- Asset: Base64 Image / Video Data +- `RAW`: Strings, Integers, Float, Boolean +- `Reference`: URLs +- `Asset`: Base64 Image / Video Data ## Receiving a response via webhook -As workflow run time can vary from seconds to minutes, the output will not be available immediately. To retrieve the final result, please provide a webhook for us to call when the results are ready. +As workflow run time can vary from seconds to minutes, the output will not be available immediately. To retrieve the final result, make sure to provide a `` webhook in the request body for us to call when the results are ready. -### Example Response +### Example response ```json { @@ -78,14 +79,18 @@ As workflow run time can vary from seconds to minutes, the output will not be av ## Troubleshooting -### Common Errors +### Common errors -- **Incorrect Input Structure:** If you provide an incorrect input structure in the curl command, an error message will be received. +- **Incorrect input structure:** If you provide an incorrect input structure in the curl command, you will receive an error message. -### Example Error Response +### Example error response ```json { "error": "Invalid input structure" } ``` + +--- + +[API-draft1](https://www.notion.so/API-draft1-8e7e8ca522264238962c4d7e8285119c?pvs=21) diff --git a/docs/deploy-to-discord.md b/docs/deploy-to-discord.md index 1625415aea..ca3d28c824 100644 --- a/docs/deploy-to-discord.md +++ b/docs/deploy-to-discord.md @@ -2,13 +2,13 @@ ## Deploying to Discord -With Salt, you can deploy and run your workflows through the `Salt AI bot`. +With Salt, you can deploy and run your workflows through the `Salt AI` Discord bot. When you’re ready to deploy, select the `Deploy` button in the top right corner. You will be prompted to give your workflow a name. Choose a unique, descriptive slug – your workflow will be discoverable by any Discord user using the Salt AI bot – then click `Deploy`. ![deployments1](images/deployments1.png) -You will see a confirmation screen when your deployment is complete. You can click to copy your workflow name to your clipboard. +You will see a confirmation screen when your deployment is complete. You can click to copy the workflow command to your clipboard. You can manage and turn off your deployments at any time in the Deployments tab of your dashboard. @@ -32,15 +32,21 @@ In any server with the Salt AI bot added, use the `/workflows` command to open t ![discord3](images/discord3.png) -Once your workflow is selected, click `Run workflow` to open the prompt box. Enter your prompt and click `Submit`. Your output will be generated and appear in the thread or channel where you posted your message. You can also choose to set your workflow as your default every time you use the bot. +Once your workflow is selected, click `Run workflow` to execute it. You can then fill in the workflow's input values, one for each SaltInput node in your workflow. Enter your string & integer values and click `Submit`. If the workflow has image or file attachments, you will be prompted to upload them in your direct messages. +Once the required inputs are filled in, your workflow will execute, and the outputs will appear in the thread or channel where you posted your message when they are finished generating. ![discord4](images/discord4.png) ## Showcasing your workflows in the Salt catalog -To make your workflows discoverable to others in the community, first **[join the Salt Discord](https://discord.gg/saltai)** and complete onboarding. +To share your workflows with the others in the community, first **[join the Salt Discord](https://discord.gg/saltai)** and complete onboarding. -Then, head to the **[#flow-catalog](https://discord.gg/FcbmPDf3E7)** channel and follow the example template to share your workflow. Be sure to run it using the Salt AI bot in a comment below and pin the comment, so others can easily grab and run it themselves. +Then, head to the **[#flow-catalog](https://discord.gg/FcbmPDf3E7)** channel and follow the example template to share your workflow. Be sure to run it using the Salt AI bot in a comment below and pin the comment, so others can easily find it and run it themselves. + +## Troubleshooting errors + +Sometimes, executions can fail based on errors in the workflow, such as invalid API keys. To fix this, you may have to make adjustments to the workflow, or get in touch with our support team for help. +Connection errors may also result in failed generation, or results that won't return even if the workflow is valid. In this case, you can `right-click` (or tap-hold on mobile) > `Apps` and select `Retry`. The execution will be run again, and could return a successful result if the issue was related to connection. ## Need help? diff --git a/docs/images/deployments1.png b/docs/images/deployments1.png index aba22c7ba6..17b795799a 100644 Binary files a/docs/images/deployments1.png and b/docs/images/deployments1.png differ diff --git a/docs/images/discord1.png b/docs/images/discord1.png index 766afd40a0..f6aa50e7ae 100644 Binary files a/docs/images/discord1.png and b/docs/images/discord1.png differ diff --git a/docs/images/discord2.png b/docs/images/discord2.png index 672599e147..f7df985def 100644 Binary files a/docs/images/discord2.png and b/docs/images/discord2.png differ diff --git a/docs/images/discord3.png b/docs/images/discord3.png index b83f2ea2e4..5a474b9bdd 100644 Binary files a/docs/images/discord3.png and b/docs/images/discord3.png differ diff --git a/docs/images/discord4.png b/docs/images/discord4.png index bffe8fbc44..6053fa2bf2 100644 Binary files a/docs/images/discord4.png and b/docs/images/discord4.png differ