Enhance prompt
curl --request POST \
--url https://api.tastelabs.com/design/prompts/enhance \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"submission_id": "sub_2f9a1c7b",
"prompt": "Design a pricing page"
}
'import requests
url = "https://api.tastelabs.com/design/prompts/enhance"
payload = {
"submission_id": "sub_2f9a1c7b",
"prompt": "Design a pricing page"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({submission_id: 'sub_2f9a1c7b', prompt: 'Design a pricing page'})
};
fetch('https://api.tastelabs.com/design/prompts/enhance', 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://api.tastelabs.com/design/prompts/enhance",
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([
'submission_id' => 'sub_2f9a1c7b',
'prompt' => 'Design a pricing page'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.tastelabs.com/design/prompts/enhance"
payload := strings.NewReader("{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.tastelabs.com/design/prompts/enhance")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/prompts/enhance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}"
response = http.request(request)
puts response.read_body{
"enhanced_prompt": "<string>",
"brand_name": "<string>",
"source_url": "<string>",
"model_used": "<string>"
}{
"detail": {
"error": "UNAUTHORIZED",
"message": "Bearer token or X-API-Key required"
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": [
{
"loc": [
"body",
"url"
],
"msg": "Field required",
"type": "missing"
}
]
}"Internal Server Error"Brand extractor
Enhance prompt
Rewrites a prompt so that it is grounded in the brand profile extracted for a given submission. Useful for steering downstream generation toward a specific brand’s look and feel.
POST
/
design
/
prompts
/
enhance
Enhance prompt
curl --request POST \
--url https://api.tastelabs.com/design/prompts/enhance \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"submission_id": "sub_2f9a1c7b",
"prompt": "Design a pricing page"
}
'import requests
url = "https://api.tastelabs.com/design/prompts/enhance"
payload = {
"submission_id": "sub_2f9a1c7b",
"prompt": "Design a pricing page"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({submission_id: 'sub_2f9a1c7b', prompt: 'Design a pricing page'})
};
fetch('https://api.tastelabs.com/design/prompts/enhance', 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://api.tastelabs.com/design/prompts/enhance",
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([
'submission_id' => 'sub_2f9a1c7b',
'prompt' => 'Design a pricing page'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.tastelabs.com/design/prompts/enhance"
payload := strings.NewReader("{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.tastelabs.com/design/prompts/enhance")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/prompts/enhance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"submission_id\": \"sub_2f9a1c7b\",\n \"prompt\": \"Design a pricing page\"\n}"
response = http.request(request)
puts response.read_body{
"enhanced_prompt": "<string>",
"brand_name": "<string>",
"source_url": "<string>",
"model_used": "<string>"
}{
"detail": {
"error": "UNAUTHORIZED",
"message": "Bearer token or X-API-Key required"
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": [
{
"loc": [
"body",
"url"
],
"msg": "Field required",
"type": "missing"
}
]
}"Internal Server Error"Authorizations
API key issued by the Taste Engine. Create one in the dashboard at https://engine.tastelabs.com/app/api-keys.
Body
application/json
Was this page helpful?

