Skip to main content
POST
Refine Prompt
Use this API to refine an existing analysis prompt based on feedback from demo runs. You provide the current prompt and a list of demos with the user’s feedback on what went wrong; the engine returns a refined analysis prompt and updated response descriptions. This is the iteration step in the prompt-design loop: run Validate Prompt to expand a simple instruction, run the demos against the resulting prompt, then refine when the demos don’t pass.

Endpoint

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

Headers

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

Body

Params

data
object
required

Example Requests

Refine after a missed detection

Response

Success Response

Failure Response

Errors: INVALID_ARGUMENT (missing required fields, empty demoFeedback array, or any demo entry missing required fields).