One authenticated POST request. Official JavaScript and Python SDKs available.
cURL
curl -X POST https://api.mecanik.dev/v1/client/YOUR_UUID/tools/ai-code-review \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"code":"const x = eval(input)","language":"javascript"}'
JavaScript (fetch)
const res = await fetch(
"https://api.mecanik.dev/v1/client/YOUR_UUID/tools/ai-code-review",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ code: source, language: "javascript" }),
},
);
const { result } = await res.json();
console.log(result.analysis.issues);
Python (requests)
import requests
r = requests.post(
"https://api.mecanik.dev/v1/client/YOUR_UUID/tools/ai-code-review",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={"code": source, "language": "python"},
)
print(r.json()["result"]["analysis"]["issues"])