Skip to main content
POST
/
v2
/
agents
/
prompt
/
validate
Validate Prompt
curl --request POST \
  --url https://api.velt.dev/v2/agents/prompt/validate \
  --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": [
      {}
    ]
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Prompt validated successfully",
    "data": {
      "validationResult": {
        "analysis_prompt": "## Objective\n...\n\n## Scope\n...",
        "requires_tool": "NONE",
        "response_descriptions": {},
        "demos": { "detection_dimensions": [], "cases": [] },
        "suggested_required_inputs": []
      }
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to expand a simple instruction into a structured QA task. The response includes:
  • An analysis prompt (markdown-formatted) with objective, scope, detection logic, and output format
  • Per-field response descriptions for AI response shaping
  • Demo test cases organized by detection dimension
  • Tool requirements
  • Suggested required runtime inputs
This is the transformation step that turns a one-line instruction into a comprehensive QA task definition you can persist as an agent.

Endpoint

POST https://api.velt.dev/v2/agents/prompt/validate

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

{
  "data": {
    "prompt": "Make sure there are no broken links on the page"
  }
}

2. Expand an accessibility instruction

{
  "data": {
    "prompt": "Check all images have alt text and all form inputs have labels"
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Prompt validated successfully",
    "data": {
      "validationResult": {
        "analysis_prompt": "## Objective\nIdentify all broken or non-functional hyperlinks on the page\n\n## Scope\nAll anchor elements (<a href>) and embedded resource URLs\n\n## Detection Logic\nHTTP HEAD/GET validation of link targets, checking for non-2xx status codes\n\n## Output Format\nList of broken links with source element, target URL, and HTTP status",
        "requires_tool": "TOOL_TEXT_EXTRACTOR",
        "response_descriptions": {
          "title": "Brief description of the broken link",
          "severity": "critical for 5xx errors, high for 4xx, medium for timeouts, low for redirects",
          "targetText": "The anchor text of the broken link",
          "suggestion": "The correct URL or action to fix the broken link",
          "issueType": "broken-link"
        },
        "demos": {
          "detection_dimensions": ["Link targets", "HTTP status codes", "Redirect chains"],
          "cases": [
            {
              "id": "demo-1",
              "title": "Broken link to documentation",
              "tier": "obvious_match",
              "dimension_tested": "HTTP status codes: 404",
              "html": "<a href=\"https://docs.example.com/api\">API Reference</a>",
              "expected": "detected",
              "reason": "Link returns 404 Not Found"
            }
          ]
        },
        "suggested_required_inputs": []
      }
    }
  }
}

Validation result fields

FieldTypeDescription
analysis_promptstringMarkdown-formatted QA analysis prompt (objective, scope, detection logic, output format)
requires_toolstring"TOOL_TEXT_EXTRACTOR" or "NONE"
response_descriptionsobjectPer-field descriptions for AI response shaping
demosobjectDemo test cases with detection_dimensions[] and tiered cases[]
suggested_required_inputsobject[]Runtime-dependent fields the user must provide at execution time

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
Errors: INVALID_ARGUMENT (missing or empty prompt).
{
  "result": {
    "status": "success",
    "message": "Prompt validated successfully",
    "data": {
      "validationResult": {
        "analysis_prompt": "## Objective\n...\n\n## Scope\n...",
        "requires_tool": "NONE",
        "response_descriptions": {},
        "demos": { "detection_dimensions": [], "cases": [] },
        "suggested_required_inputs": []
      }
    }
  }
}