Enhance Prompt
curl --request POST \
--url https://api.velt.dev/v2/agents/prompt/enhance \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"prompt": "<string>",
"provider": "<string>",
"userContextFields": [
{}
]
}
}
'import requests
url = "https://api.velt.dev/v2/agents/prompt/enhance"
payload = { "data": {
"prompt": "<string>",
"provider": "<string>",
"userContextFields": [{}]
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({data: {prompt: '<string>', provider: '<string>', userContextFields: [{}]}})
};
fetch('https://api.velt.dev/v2/agents/prompt/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.velt.dev/v2/agents/prompt/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([
'data' => [
'prompt' => '<string>',
'provider' => '<string>',
'userContextFields' => [
[
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-token>"
],
]);
$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.velt.dev/v2/agents/prompt/enhance"
payload := strings.NewReader("{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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://api.velt.dev/v2/agents/prompt/enhance")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/agents/prompt/enhance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "Prompt enhanced successfully",
"data": {
"enhancedPrompt": { "requirement": null }
}
}
}
Prompt
Enhance Prompt
POST
/
v2
/
agents
/
prompt
/
enhance
Enhance Prompt
curl --request POST \
--url https://api.velt.dev/v2/agents/prompt/enhance \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"prompt": "<string>",
"provider": "<string>",
"userContextFields": [
{}
]
}
}
'import requests
url = "https://api.velt.dev/v2/agents/prompt/enhance"
payload = { "data": {
"prompt": "<string>",
"provider": "<string>",
"userContextFields": [{}]
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({data: {prompt: '<string>', provider: '<string>', userContextFields: [{}]}})
};
fetch('https://api.velt.dev/v2/agents/prompt/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.velt.dev/v2/agents/prompt/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([
'data' => [
'prompt' => '<string>',
'provider' => '<string>',
'userContextFields' => [
[
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-token>"
],
]);
$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.velt.dev/v2/agents/prompt/enhance"
payload := strings.NewReader("{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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://api.velt.dev/v2/agents/prompt/enhance")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/agents/prompt/enhance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"prompt\": \"<string>\",\n \"provider\": \"<string>\",\n \"userContextFields\": [\n {}\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "Prompt enhanced successfully",
"data": {
"enhancedPrompt": { "requirement": null }
}
}
}
Use this API to check whether a prompt has enough detail for agent execution. It returns either a “sufficient” signal or a specific clarification request with suggested options. It does not modify the prompt; it only checks completeness.
Response fields:
Errors:
Endpoint
POST https://api.velt.dev/v2/agents/prompt/enhance
Headers
Your API key.
Your Auth Token.
Body
Params
Show properties
Show properties
Min 1 char. The user’s raw prompt to validate.
LLM provider override:
"gemini" or "claude".Optional declared user-context fields, so the enhancer knows which runtime inputs the agent will already collect and does not ask for them again. Each entry:
{ id, title, type, example?, defaultValue? }.Example Requests
1. Simple prompt
{
"data": {
"prompt": "Check that the page uses our brand colors"
}
}
2. With provider override and declared user context
{
"data": {
"prompt": "Verify all CTAs use the correct color",
"provider": "claude",
"userContextFields": [
{ "id": "brand_color", "title": "Primary brand color", "type": "string" }
]
}
}
Response
Success Response (prompt is sufficient)
When the prompt contains enough information,requirement is null:
{
"result": {
"status": "success",
"message": "Prompt enhanced successfully",
"data": {
"enhancedPrompt": {
"requirement": null
}
}
}
}
Success Response (needs clarification)
{
"result": {
"status": "success",
"message": "Prompt enhanced successfully",
"data": {
"enhancedPrompt": {
"requirement": "Please specify which brand colors to verify",
"context": "We need the exact hex values or color names to check accurately",
"suggestion": [
"check primary brand color #1A73E8 only",
"check all brand palette colors"
],
"suggestion_type": "single-select"
}
}
}
}
| Field | Type | Present When | Description |
|---|---|---|---|
requirement | string | null | always | null if the prompt is sufficient; a clarification question otherwise. |
context | string | needs clarification | Additional context explaining why clarification is needed. |
suggestion | string[] | needs clarification | Suggested options for the user to choose from. |
suggestion_type | string | needs clarification | "boolean", "single-select", "multi-select", or "info". |
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
INVALID_ARGUMENT (missing or empty prompt).
{
"result": {
"status": "success",
"message": "Prompt enhanced successfully",
"data": {
"enhancedPrompt": { "requirement": null }
}
}
}
Was this page helpful?
⌘I

