Superstorm
Documentation
We are still in beta for Superstorm API!
We're moving fast on it, feel free to send us your feedback: team@superstorm.dev
Introduction
You can use Superstom to train models according to your inputs or context and easily execute a prediction via a simple HTTP call.
Superstorm's API is based on REST principles. It features logically structured URLs related to the resources it manages, and it handles requests that are form-encoded. The API provides responses in the JSON format and uses common HTTP response codes, authentication methods, and action words.
Authentication
All API requests must be authenticated with a token. Include this header with all requests.
If you don’t have an API Key yet, no worries, you can create one in your account.
Exemple request
Curl
JavaScript
Authorization: Token <Your API Key>
Text image model
Customize
This operation allows you to contextualize your text to image model with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can provide a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
reference
Required
string
The reference is a unique identifier of what your images are representing. After training, you will use this reference in your prompts to explain to the model what you are looking for.
prompt
Required
string
The prompt describes images you use to train the model. It should start by “photo of <your reference> <class name>” where <class name> represents what your image corresponds to such as a person, a dog, etc.
image
Required
array
An array of images corresponding to what you want the model train on. You must send at least one image but the more you send the better the model will understand what you need.
webhook
Optionnal
string
Url will be invoked when the training is complete.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/txt2img' \
--header 'Authorization: <Your API Key>' \
--form 'name="<Your project name>"' \
--form 'reference="<Your reference>"' \
--form 'prompt="<Your prompt>"' \
—-form 'webhook="<Your webhook url>"' \
--form 'images=@"<File path image 1>"' \
--form 'images=@"<File path image 2>"' \
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "<Your project Id>",
"modelType": "TEXT_TO_IMG",
"name": "<Your project name>",
"projectMetadata": {
"prompt": "<Your prompt>",
"token": "<Your token>",
"images": [
{
"url": "<Url image 1>",
"filename": "<Filename image 1>"
},
{
"url": <Url image 2>",
"filename": "<Filename image 2>"
}
]
}
}
},
"status": 200,
"success": true
}
Invoke
Once your model is ready, you can invoke it by giving a prompt and ask it to generate a new image.
As models can take several seconds to run, your output won’t be available immediately. You can provide a webhook URL to be notified automatically or request manually our Get Answer By Request Id Endpoint
Parameters
prompt
Required
string
The prompt describes the image you want to generate. It must contain your reference so that the model understands that it has to include this in the new image.
webhook
Optionnal
string
Url will be invoked when the training is done.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"webhook":"<Your webhook url>",
"payload":{
"prompt":"<A prompt>",
}
}'
Exemple Answer
{
"data": {
"newRequest": {
"createdAt": "1683548162635",
"id": "<Your request ID>",
"requestPayload": "{\"prompt\": \"<A prompt>\"}",
"rstatus": "pending"
}
},
"status": 200,
"success": true
}
Get Answer By Request Id
Once an invoke is executed, this operation allows you to verify if the run is pending or finished. When the run is done, you can get your image answer.
Parameters
project id
Required
string
Identifier of your project.
request id
Required
string
Identifier of the request you want to get the answer.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/<YOUR PROJECT ID>/requests/<A REQUEST ID>' \
--header 'Accept: application/json' \
--header '<YOUR API KEY>'
Exemple Answer
{
"data": {
"request": {
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
},
"status": 200,
"success": true
}
Chatbot
Customize
This operation allows you to provide context to your chatbot with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can use a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
companyName
Required
string
The name of the company where the chatbot is hired.
botName
Required
string
The name to give to your chatbot.
toneVoice
Required
string
The tone of voice the chatbot has to use when answering.
temperature
Required
string
Degree of freedom to give to the chatbot. Between 0 and 1 where 0 is very determinist and 1 is very creative.
dontKnowMsg
Required
string
Message to answer when chatbot doesn’t know.
webhook
Optionnal
string
Url will be invoked when the training is done.
articles
Required
array
Array of objects composed by a title and a body. You must send at least 4 articles but the more you send the better the model will understand what you need.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/chatbot' \
--header 'Authorization: <YOUR API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"name":"<Your project name>",
"companyName": "<Your company name>",
"botName": "<Your chatbot name>",
"toneVoice": "<Chatbot tone of voice>",
"temperature": <Temperature between 0 and 1>,
"dontKnowMsg": "<Message to answer when chatbot doesn’t know>",
"webhook": "<Your webhook url>",
"articles":[{
"title": "<Title 1>",
"body": "<Content 1>"
},
{
"title": "<Title 2>",
"body": “<Content 2>"
}],
}'
Exemple Answer
{
"data": {
"project": {
"deployMode": "SERVERLESS",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "CHAT",
"name": "My cool chatbot",
"projectMetadata": {
"company_name":"WYZ Company",
"bot_name": "Alpha bot",
"dont_know_msg": "Sorry, i don't know",
"temperature": 0.75,
"tone_voice": "helpful",
"articles": [
{
"title": "Title 1",
"body": "Content 1"
},
{
"title": "Title 2",
"body": "Content 2"
},
},
{
"title": "Title 3",
"body": "Content 3"
},
},
{
"title": "Title 4",
"body": "Content 4"
},
]
},
"pstatus": "Pending",
"requests": []
}
},
"status": 200,
"success": true
}
Invoke
Once your chatbot is ready, you can invoke it by giving a prompt and start chatting with it. If you don’t provide a discussionId, your chatbot will suppose that it is a new discussion and will provide you a new discussionId. If you give it a discussionId, it will answer based on the previous message.
Parameters
project id
Required
string
Identifier of your project
input
Required
string
The message you want to send to your chatbot
discussion id
Optionnal
string
Identifier of a previous discussion
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"discussionId":"<Discussion ID (optional)>",
"payload":{
"input":"<A prompt>",
}
}'
Exemple Answer
{
"data":{
"discusstionId": "d471aef6-f80a-4004-a958-1c7bb0addb39"
"predictions":[
"To schedule a meet you should connect via your portal ..."
]
},
"status": 200,
"success": true
}
Manage projects
Get all projects
This operation allows you to get all your projects you have created at one time. Each time you customize a model, it creates a new project with all the metadata you provided.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"projects": [
{
"deployMode": "ASYNC",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"createdAt": "1683548162635",
"images": [
"https://url-generated-img"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
]
},
"status": 200,
"success": true
}
Get a project
This operation allows you to get one specific project.
Parameters
project id
Required
string
Identifier of your project.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/d9bca1d5-e302-4046-8fba-4c420390664a' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
},
"status": 200,
"success": true
}
Superstorm
Documentation
We are still in beta for Superstorm API!
We're moving fast on it, feel free to send us your feedback: team@superstorm.dev
Introduction
You can use Superstom to train models according to your inputs or context and easily execute a prediction via a simple HTTP call.
Superstorm's API is based on REST principles. It features logically structured URLs related to the resources it manages, and it handles requests that are form-encoded. The API provides responses in the JSON format and uses common HTTP response codes, authentication methods, and action words.
Authentication
All API requests must be authenticated with a token. Include this header with all requests.
If you don’t have an API Key yet, no worries, you can create one in your account.
Exemple request
Curl
JavaScript
Authorization: Token <Your API Key>
Text image model
Customize
This operation allows you to contextualize your text to image model with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can provide a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
reference
Required
string
The reference is a unique identifier of what your images are representing. After training, you will use this reference in your prompts to explain to the model what you are looking for.
prompt
Required
string
The prompt describes images you use to train the model. It should start by “photo of <your reference> <class name>” where <class name> represents what your image corresponds to such as a person, a dog, etc.
image
Required
array
An array of images corresponding to what you want the model train on. You must send at least one image but the more you send the better the model will understand what you need.
webhook
Optionnal
string
Url will be invoked when the training is complete.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/txt2img' \
--header 'Authorization: <Your API Key>' \
--form 'name="<Your project name>"' \
--form 'reference="<Your reference>"' \
--form 'prompt="<Your prompt>"' \
—-form 'webhook="<Your webhook url>"' \
--form 'images=@"<File path image 1>"' \
--form 'images=@"<File path image 2>"' \
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "<Your project Id>",
"modelType": "TEXT_TO_IMG",
"name": "<Your project name>",
"projectMetadata": {
"prompt": "<Your prompt>",
"token": "<Your token>",
"images": [
{
"url": "<Url image 1>",
"filename": "<Filename image 1>"
},
{
"url": <Url image 2>",
"filename": "<Filename image 2>"
}
]
}
}
},
"status": 200,
"success": true
}
Invoke
Once your model is ready, you can invoke it by giving a prompt and ask it to generate a new image.
As models can take several seconds to run, your output won’t be available immediately. You can provide a webhook URL to be notified automatically or request manually our Get Answer By Request Id Endpoint
Parameters
prompt
Required
string
The prompt describes the image you want to generate. It must contain your reference so that the model understands that it has to include this in the new image.
webhook
Optionnal
string
Url will be invoked when the training is done.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"webhook":"<Your webhook url>",
"payload":{
"prompt":"<A prompt>",
}
}'
Exemple Answer
{
"data": {
"newRequest": {
"createdAt": "1683548162635",
"id": "<Your request ID>",
"requestPayload": "{\"prompt\": \"<A prompt>\"}",
"rstatus": "pending"
}
},
"status": 200,
"success": true
}
Get Answer By Request Id
Once an invoke is executed, this operation allows you to verify if the run is pending or finished. When the run is done, you can get your image answer.
Parameters
project id
Required
string
Identifier of your project.
request id
Required
string
Identifier of the request you want to get the answer.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/<YOUR PROJECT ID>/requests/<A REQUEST ID>' \
--header 'Accept: application/json' \
--header '<YOUR API KEY>'
Exemple Answer
{
"data": {
"request": {
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
},
"status": 200,
"success": true
}
Chatbot
Customize
This operation allows you to provide context to your chatbot with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can use a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
companyName
Required
string
The name of the company where the chatbot is hired.
botName
Required
string
The name to give to your chatbot.
toneVoice
Required
string
The tone of voice the chatbot has to use when answering.
temperature
Required
string
Degree of freedom to give to the chatbot. Between 0 and 1 where 0 is very determinist and 1 is very creative.
dontKnowMsg
Required
string
Message to answer when chatbot doesn’t know.
webhook
Optionnal
string
Url will be invoked when the training is done.
articles
Required
array
Array of objects composed by a title and a body. You must send at least 4 articles but the more you send the better the model will understand what you need.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/chatbot' \
--header 'Authorization: <YOUR API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"name":"<Your project name>",
"companyName": "<Your company name>",
"botName": "<Your chatbot name>",
"toneVoice": "<Chatbot tone of voice>",
"temperature": <Temperature between 0 and 1>,
"dontKnowMsg": "<Message to answer when chatbot doesn’t know>",
"webhook": "<Your webhook url>",
"articles":[{
"title": "<Title 1>",
"body": "<Content 1>"
},
{
"title": "<Title 2>",
"body": “<Content 2>"
}],
}'
Exemple Answer
{
"data": {
"project": {
"deployMode": "SERVERLESS",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "CHAT",
"name": "My cool chatbot",
"projectMetadata": {
"company_name":"WYZ Company",
"bot_name": "Alpha bot",
"dont_know_msg": "Sorry, i don't know",
"temperature": 0.75,
"tone_voice": "helpful",
"articles": [
{
"title": "Title 1",
"body": "Content 1"
},
{
"title": "Title 2",
"body": "Content 2"
},
},
{
"title": "Title 3",
"body": "Content 3"
},
},
{
"title": "Title 4",
"body": "Content 4"
},
]
},
"pstatus": "Pending",
"requests": []
}
},
"status": 200,
"success": true
}
Invoke
Once your chatbot is ready, you can invoke it by giving a prompt and start chatting with it. If you don’t provide a discussionId, your chatbot will suppose that it is a new discussion and will provide you a new discussionId. If you give it a discussionId, it will answer based on the previous message.
Parameters
project id
Required
string
Identifier of your project
input
Required
string
The message you want to send to your chatbot
discussion id
Optionnal
string
Identifier of a previous discussion
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"discussionId":"<Discussion ID (optional)>",
"payload":{
"input":"<A prompt>",
}
}'
Exemple Answer
{
"data":{
"discusstionId": "d471aef6-f80a-4004-a958-1c7bb0addb39"
"predictions":[
"To schedule a meet you should connect via your portal ..."
]
},
"status": 200,
"success": true
}
Manage projects
Get all projects
This operation allows you to get all your projects you have created at one time. Each time you customize a model, it creates a new project with all the metadata you provided.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"projects": [
{
"deployMode": "ASYNC",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"createdAt": "1683548162635",
"images": [
"https://url-generated-img"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
]
},
"status": 200,
"success": true
}
Get a project
This operation allows you to get one specific project.
Parameters
project id
Required
string
Identifier of your project.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/d9bca1d5-e302-4046-8fba-4c420390664a' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
},
"status": 200,
"success": true
}
Superstorm
Documentation
We are still in beta for Superstorm API!
We're moving fast on it, feel free to send us your feedback: team@superstorm.dev
Introduction
You can use Superstom to train models according to your inputs or context and easily execute a prediction via a simple HTTP call.
Superstorm's API is based on REST principles. It features logically structured URLs related to the resources it manages, and it handles requests that are form-encoded. The API provides responses in the JSON format and uses common HTTP response codes, authentication methods, and action words.
Authentication
All API requests must be authenticated with a token. Include this header with all requests.
If you don’t have an API Key yet, no worries, you can create one in your account.
Exemple request
Curl
JavaScript
Authorization: Token <Your API Key>
Text image model
Customize
This operation allows you to contextualize your text to image model with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can provide a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
reference
Required
string
The reference is a unique identifier of what your images are representing. After training, you will use this reference in your prompts to explain to the model what you are looking for.
prompt
Required
string
The prompt describes images you use to train the model. It should start by “photo of <your reference> <class name>” where <class name> represents what your image corresponds to such as a person, a dog, etc.
image
Required
array
An array of images corresponding to what you want the model train on. You must send at least one image but the more you send the better the model will understand what you need.
webhook
Optionnal
string
Url will be invoked when the training is complete.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/txt2img' \
--header 'Authorization: <Your API Key>' \
--form 'name="<Your project name>"' \
--form 'reference="<Your reference>"' \
--form 'prompt="<Your prompt>"' \
—-form 'webhook="<Your webhook url>"' \
--form 'images=@"<File path image 1>"' \
--form 'images=@"<File path image 2>"' \
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "<Your project Id>",
"modelType": "TEXT_TO_IMG",
"name": "<Your project name>",
"projectMetadata": {
"prompt": "<Your prompt>",
"token": "<Your token>",
"images": [
{
"url": "<Url image 1>",
"filename": "<Filename image 1>"
},
{
"url": <Url image 2>",
"filename": "<Filename image 2>"
}
]
}
}
},
"status": 200,
"success": true
}
Invoke
Once your model is ready, you can invoke it by giving a prompt and ask it to generate a new image.
As models can take several seconds to run, your output won’t be available immediately. You can provide a webhook URL to be notified automatically or request manually our Get Answer By Request Id Endpoint
Parameters
prompt
Required
string
The prompt describes the image you want to generate. It must contain your reference so that the model understands that it has to include this in the new image.
webhook
Optionnal
string
Url will be invoked when the training is done.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"webhook":"<Your webhook url>",
"payload":{
"prompt":"<A prompt>",
}
}'
Exemple Answer
{
"data": {
"newRequest": {
"createdAt": "1683548162635",
"id": "<Your request ID>",
"requestPayload": "{\"prompt\": \"<A prompt>\"}",
"rstatus": "pending"
}
},
"status": 200,
"success": true
}
Get Answer By Request Id
Once an invoke is executed, this operation allows you to verify if the run is pending or finished. When the run is done, you can get your image answer.
Parameters
project id
Required
string
Identifier of your project.
request id
Required
string
Identifier of the request you want to get the answer.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/<YOUR PROJECT ID>/requests/<A REQUEST ID>' \
--header 'Accept: application/json' \
--header '<YOUR API KEY>'
Exemple Answer
{
"data": {
"request": {
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
},
"status": 200,
"success": true
}
Chatbot
Customize
This operation allows you to provide context to your chatbot with your own data.
Once your data is well prepared (click here if you want to know how to prepare your data), you can send your request to Superstorm.
As the training model can take several minutes, it won’t be ready immediately. You can use a webhook URL to be notified automatically or request manually our Get Project By Id Endpoint
Parameters
name
Required
string
The project name is displayed on your dashboard and allows you to quickly identify your project among all. It should be short and relevant.
companyName
Required
string
The name of the company where the chatbot is hired.
botName
Required
string
The name to give to your chatbot.
toneVoice
Required
string
The tone of voice the chatbot has to use when answering.
temperature
Required
string
Degree of freedom to give to the chatbot. Between 0 and 1 where 0 is very determinist and 1 is very creative.
dontKnowMsg
Required
string
Message to answer when chatbot doesn’t know.
webhook
Optionnal
string
Url will be invoked when the training is done.
articles
Required
array
Array of objects composed by a title and a body. You must send at least 4 articles but the more you send the better the model will understand what you need.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/finetune/chatbot' \
--header 'Authorization: <YOUR API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"name":"<Your project name>",
"companyName": "<Your company name>",
"botName": "<Your chatbot name>",
"toneVoice": "<Chatbot tone of voice>",
"temperature": <Temperature between 0 and 1>,
"dontKnowMsg": "<Message to answer when chatbot doesn’t know>",
"webhook": "<Your webhook url>",
"articles":[{
"title": "<Title 1>",
"body": "<Content 1>"
},
{
"title": "<Title 2>",
"body": “<Content 2>"
}],
}'
Exemple Answer
{
"data": {
"project": {
"deployMode": "SERVERLESS",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "CHAT",
"name": "My cool chatbot",
"projectMetadata": {
"company_name":"WYZ Company",
"bot_name": "Alpha bot",
"dont_know_msg": "Sorry, i don't know",
"temperature": 0.75,
"tone_voice": "helpful",
"articles": [
{
"title": "Title 1",
"body": "Content 1"
},
{
"title": "Title 2",
"body": "Content 2"
},
},
{
"title": "Title 3",
"body": "Content 3"
},
},
{
"title": "Title 4",
"body": "Content 4"
},
]
},
"pstatus": "Pending",
"requests": []
}
},
"status": 200,
"success": true
}
Invoke
Once your chatbot is ready, you can invoke it by giving a prompt and start chatting with it. If you don’t provide a discussionId, your chatbot will suppose that it is a new discussion and will provide you a new discussionId. If you give it a discussionId, it will answer based on the previous message.
Parameters
project id
Required
string
Identifier of your project
input
Required
string
The message you want to send to your chatbot
discussion id
Optionnal
string
Identifier of a previous discussion
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your API Key>' \
--data '{
"projectId":"<Your project ID>",
"discussionId":"<Discussion ID (optional)>",
"payload":{
"input":"<A prompt>",
}
}'
Exemple Answer
{
"data":{
"discusstionId": "d471aef6-f80a-4004-a958-1c7bb0addb39"
"predictions":[
"To schedule a meet you should connect via your portal ..."
]
},
"status": 200,
"success": true
}
Manage projects
Get all projects
This operation allows you to get all your projects you have created at one time. Each time you customize a model, it creates a new project with all the metadata you provided.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"projects": [
{
"deployMode": "ASYNC",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"createdAt": "1683548162635",
"images": [
"https://url-generated-img"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
]
},
"status": 200,
"success": true
}
Get a project
This operation allows you to get one specific project.
Parameters
project id
Required
string
Identifier of your project.
Exemple request
Curl
JavaScript
curl --location 'https://api.beta.superstorm.dev/projects/d9bca1d5-e302-4046-8fba-4c420390664a' \
--header 'Accept: application/json' \
--header 'Authorization:<Your API Key>'
Exemple Answer
{
"data": {
"project": {
"deployMode": "ASYNC",
"id": "d9bca1d5-e302-4046-8fba-4c420390664a",
"modelType": "TEXT_TO_IMG",
"name": "a project name",
"projectMetadata": {
"images": [
{
"url": "https://url-to-img-0",
"filename": "0.jpg"
},
{
"url": "https://url-to-img-1",
"filename": "1.jpg"
},
{
"url": "https://url-to-img-2",
"filename": "2.jpg"
},
{
"url": "https://url-to-img-3",
"filename": "3.jpg"
}
],
"prompt": "A photo of xyz dog",
"token": "xyz"
},
"pstatus": "DEPLOYED",
"requests": [
{
"id":"9b10b4bb-5dc1-4bfe-b5ba-52b8c2565abc-255945",
"createdAt": "1683548162635",
"images": [
"https://url-to-generated-request-photo"
],
"requestPayload": {
"prompt": "A photo of xyz dog flying"
},
"rstatus": "success"
}
]
}
},
"status": 200,
"success": true
}
Copyright © 2023 Superstorm
Copyright © 2023 Superstorm
Copyright © 2023 Superstorm