Generate content
curl --request POST \
--url https://app.alana.shopping/api/ai/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productContext": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"price": 123,
"brandId": "<string>",
"category": "<string>"
},
"prompt": "<string>",
"model": "balanced",
"surfaceKey": "<string>"
}
'import requests
url = "https://app.alana.shopping/api/ai/generate"
payload = {
"productContext": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"price": 123,
"brandId": "<string>",
"category": "<string>"
},
"prompt": "<string>",
"model": "balanced",
"surfaceKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productContext: {
id: '<string>',
name: '<string>',
brand: '<string>',
description: '<string>',
price: 123,
brandId: '<string>',
category: '<string>'
},
prompt: '<string>',
model: 'balanced',
surfaceKey: '<string>'
})
};
fetch('https://app.alana.shopping/api/ai/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.alana.shopping/api/ai/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productContext' => [
'id' => '<string>',
'name' => '<string>',
'brand' => '<string>',
'description' => '<string>',
'price' => 123,
'brandId' => '<string>',
'category' => '<string>'
],
'prompt' => '<string>',
'model' => 'balanced',
'surfaceKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.alana.shopping/api/ai/generate"
payload := strings.NewReader("{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.alana.shopping/api/ai/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.alana.shopping/api/ai/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"action": "<string>",
"data": {}
}{
"error": "INVALID_REQUEST",
"details": {
"field": "email",
"message": "Invalid email format"
}
}{
"error": "UNAUTHORIZED",
"details": {
"message": "Missing or invalid authentication token"
}
}{
"error": "INTERNAL_SERVER_ERROR",
"details": {
"message": "An unexpected error occurred"
}
}Gerar com IA
Generate product descriptions, titles, or other content using AI
POST
/
api
/
ai
/
generate
Generate content
curl --request POST \
--url https://app.alana.shopping/api/ai/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productContext": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"price": 123,
"brandId": "<string>",
"category": "<string>"
},
"prompt": "<string>",
"model": "balanced",
"surfaceKey": "<string>"
}
'import requests
url = "https://app.alana.shopping/api/ai/generate"
payload = {
"productContext": {
"id": "<string>",
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"price": 123,
"brandId": "<string>",
"category": "<string>"
},
"prompt": "<string>",
"model": "balanced",
"surfaceKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productContext: {
id: '<string>',
name: '<string>',
brand: '<string>',
description: '<string>',
price: 123,
brandId: '<string>',
category: '<string>'
},
prompt: '<string>',
model: 'balanced',
surfaceKey: '<string>'
})
};
fetch('https://app.alana.shopping/api/ai/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.alana.shopping/api/ai/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productContext' => [
'id' => '<string>',
'name' => '<string>',
'brand' => '<string>',
'description' => '<string>',
'price' => 123,
'brandId' => '<string>',
'category' => '<string>'
],
'prompt' => '<string>',
'model' => 'balanced',
'surfaceKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.alana.shopping/api/ai/generate"
payload := strings.NewReader("{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.alana.shopping/api/ai/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.alana.shopping/api/ai/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productContext\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"brandId\": \"<string>\",\n \"category\": \"<string>\"\n },\n \"prompt\": \"<string>\",\n \"model\": \"balanced\",\n \"surfaceKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"action": "<string>",
"data": {}
}{
"error": "INVALID_REQUEST",
"details": {
"field": "email",
"message": "Invalid email format"
}
}{
"error": "UNAUTHORIZED",
"details": {
"message": "Missing or invalid authentication token"
}
}{
"error": "INTERNAL_SERVER_ERROR",
"details": {
"message": "An unexpected error occurred"
}
}Autorizações
Bearer token authentication via Auth0. Users authenticate through Auth0 Universal Login. Include the access token in the Authorization header: Authorization: Bearer <token>
Corpo
application/json
Canvas action to execute. When action='faq', the response data is post-filtered: only FAQs with confidence >= 0.7 are returned, and the request fails with 400 if fewer than 5 high-confidence FAQs survive.
Opções disponíveis:
text, media, context, persona, taxonomy, semantic, faq, relationships, offer, reputation, technical, compliance, logistics, comparative, ai-readiness, optimization-score, visual_attributes, reshoot_product, change_backdrop, relight_product, image_upscale, product_video, batch_video, garment_swap, look_composer, look_variations, look_video, look_description, audio_description, sound_effect Show child attributes
Show child attributes
Optional user prompt to guide generation
LLM quality tier to use for generation
Opções disponíveis:
economic, balanced, high Optional distribution surface key (e.g. google_shopping, vtex_pdp). When provided, surface constraints are applied to the generated output.
Última modificação em 16 de fevereiro de 2026
⌘I