Generate criterion prompt from behavior
POST
/api/v1/criteria/generate-prompt
const url = 'https://example.com/api/v1/criteria/generate-prompt?projectId=00000000-0000-0000-0000-000000000000';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"behavior":"example","currentId":"example","gates":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/v1/criteria/generate-prompt?projectId=00000000-0000-0000-0000-000000000000' \ --header 'Content-Type: application/json' \ --data '{ "behavior": "example", "currentId": "example", "gates": [ "example" ] }'Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” projectId
Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.
string
Optional project scope. When provided, a slug/id is resolved within that project (slugs may repeat across projects); when omitted, resolution falls back to a legacy global lookup for backward compatibility.
Request Body
Section titled “Request Body ” Media type application/json
object
behavior
required
string
currentId
string
gates
Array<string>
Responses
Section titled “ Responses ”Success
Media type application/json
object
prompt
required
string
suggestedId
required
string
suggestedParents
required
Array<string>
suggestedChildren
required
Array<string>
Empty behavior string
LLM not configured