Skip to main content

Write and test a js check script from a confirmed contract

POST 

/api/v1/orgs/:org/checks/ai/generate

Runs SolidPing's agent loop: the LLM explores the target (fetch_page, browser_snapshot) and tests its script (run_script) until a run returns up or the turn cap (SP_AI_MAX_TURNS) is hit. Returns the script, its last run and the js config to save through POST /checks (without the secrets, which only the caller holds). The LLM only ever sees secret names. Nothing is saved. 422 with the last attempt when no script passed. 404 when no AI provider is configured, or when checkUid names no js check of the org. Send Accept: application/x-ndjson to get the progress streamed: a 200 whose body is one JSON object per line, turn, message, tool, toolResult and ping lines while it runs, then a last result line (result holds the 200 body) or error line (httpStatus and response hold what the plain call would have answered).

Request​

Responses​

A script that passed its test run