BASE URL:
https://create.cocktailstudio.io/api
ENDPOINT:
GET "https://create.cocktailstudio.io/api/auth"
REQUEST:
{
"email": "youremail@meail.com"
}
RESPONSE:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
ENDPOINT:
GET "https://create.cocktailstudio.io/api/userinfo"
RESPONSE:
{
"creditPackage": 1000,
"email": "youremail@email.com",
"creditUsage": 376,
"type": "Standart Plan"
}
ENDPOINT:
POST "https://create.cocktailstudio.io/api/job/image"
REQUEST:
{
"templateId" : 1111,
"assets" : [
{ "layerName": "title", "value": "pink sweater" },
{ "layerName": "price", "value": "$19.90" },
{ "layerName": "image", "value": "https://img.freepik.com/pretty-modern-woman.png" },
{ "layerName": "color", "value": "#21243b" },
]
}
RESPONSE:
{
"message": "Success! The POST request was processed successfully.",
"jobId": "a7dd599d-c245-4ec7-ad89-529fb051b8a7"
}
ENDPOINT:
POST "https://create.cocktailstudio.io/api/job/video"
REQUEST:
{
"templateId" : 1111,
"assets" : [
{ "layerName": "title", "value": "pink sweater" },
{ "layerName": "price", "value": "$19.90" },
{ "layerName": "image", "value": "https://img.freepik.com/pretty-modern-woman.png" },
{ "layerName": "color", "value": "#21243b" },
]
}
RESPONSE:
{
"message": "Success! The POST request was processed successfully.",
"jobId": "a7dd599d-c245-4ec7-ad89-529fb051b8a7"
}
const data = {
"templateId" : 1111,
"assets" : [
{ "layerName": "title", "value": "pink sweater" },
{ "layerName": "price", "value": "$19.90" },
{ "layerName": "image", "value": "https://img.freepik.com/pretty-modern-woman.png" },
{ "layerName": "color", "value": "#21243b" },
]
}
fetch('https://create.cocktailstudio.io/api/job/image', {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type' : 'application/json',
'Authorization' : `Bearer ${token}`
}
})
const data = {
"templateId" : 1111,
"assets" : [
{ "layerName": "title", "value": "pink sweater" },
{ "layerName": "price", "value": "$19.90" },
{ "layerName": "image", "value": "https://img.freepik.com/pretty-modern-woman.png" },
{ "layerName": "color", "value": "#21243b" },
]
}
fetch('https://create.cocktailstudio.io/api/job/image', {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type' : 'application/json',
'Authorization' : `Bearer ${token}`
}
})