Setting up OpenAI
1. Add integration
Select OpenAI from the in-app Integrations page.2. Configure settings
Fill out the form with the following settings:| Setting | Required | Description |
|---|---|---|
| Name | ✓ | Name that will be displayed to users when selecting this integration in Superblocks |
| API Key | ✓ | API key for your OpenAI account |
| Organization ID | ✗ | Specify which organization should be used for requests |
3. Test and save
Click Test Connection to check that Superblocks can connect to the data source.If using Superblocks Cloud, add these Superblocks IPs to your allowlist (not necessary for Hybrid or Cloud-Prem deployments).
4. Set profiles
Optionally, configure different profiles for separate development environments.OpenAI connected!
Now you can use OpenAI in any Application, Workflow, or Scheduled Job.
Now you can use OpenAI in any Application, Workflow, or Scheduled Job.
Actions
Generate ChatGPT Response
Given a prompt, the model will return a chat completion response.| Field | Description |
|---|---|
| Prompt | The user input or question used to prompt the OpenAI API to generate a response |
| Message History | Previous conversation history between the user and OpenAI. This enables users to reference prior messages in their prompt |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |
| Max Tokens (optional) | Maximum number of tokens (words or symbols) the generated response can contain |
| System Instruction (optional) | Specific instruction to set the intended behavior of the AI language model, such as “Be a helpful assistant”, “Speak as F500 CEO”, “Make responses funny” |
Generate Text
Given a prompt, the model will return a text completion response.| Field | Description |
|---|---|
| Type | New Text (Given a prompt, the model will return a predicted text completion.) or Edit Text (Given text, the model will edit the text based on the prompt.) |
| Prompt | The text or question describing the text to generate or edit |
| Text to Edit | The original text that requires editing. Used as the basis for generating a revised version of the text |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |
| Max Tokens (optional) | Maximum number of tokens (words or symbols) the generated response can contain |
Generate Code
Given a prompt or code, the model will return a code completion response.| Field | Description |
|---|---|
| Type | New Code (Given a prompt, the model will return code completion.) or Edit Code (Given a code snippet, the model will edit the code based on the prompt.) |
| Prompt | The text or question describing the code to generate or edit |
| Code to Edit | The original code that requires editing. Used as the basis for generating a revised version of the code |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |
| Max Tokens (optional) | Maximum number of tokens (words or symbols) the generated response can contain |
Generate Image
Given a prompt or image, the model will return a new image.Generate from Prompt
Given a prompt, the model will generate a new image.| Field | Description |
|---|---|
| Prompt | A text description of the desired image. The maximum length is 1000 characters |
| Image Size | The size of the generated images, options are: 256x256, 512x512, or 1024x1024 |
Edit Image
Given an original image and a prompt, the model will create an edited or extended image.| Field | Description |
|---|---|
| Prompt | A text description of the desired image. The maximum length is 1000 characters |
| Image File to Edit | The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. Image URLs are not supported |
| Image Mask (optional) | An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image |
| Generated Image Size | The size of the generated images, options are: 256x256, 512x512, or 1024x1024 |
Vary Image
Given an original image, the model will create a variation of the image.| Field | Description |
|---|---|
| Image File | The image to use as the basis for the variation. Must be a valid PNG file, less than 4MB, and square. Image URLs are not supported |
| Image Size | The size of the generated images, options are: 256x256, 512x512, or 1024x1024 |
Check Moderation
Given text, the model will check for hate, hate/threatening, self-harm, sexual, sexual/minors, violence, or violence/graphic content.| Field | Description |
|---|---|
| Text | The text to run a moderation check on. |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |
Transcribe Audio to Text
Given an audio file, convert to text.| Field | Description |
|---|---|
| Audio File | The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm |
| Translate to English | Translates the input audio to English |
| Input Language | The language the input audio is in |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |
Generate Text Embedding
Given text, will generate a vector representation of the text that can be consumed by ML models and algorithms.| Field | Description |
|---|---|
| Input | Input text to get embeddings for. Must not exceed 8,192 tokens |
Advanced Tuning Parameters:
| Field | Description |
|---|---|
| AI Model | The AI Model to use when generating responses |

