Webhooks
Base URL https://arteza.ai/api/v1
OpenAPI 3.1 specification, for SDK generators and agents: /api/v1/openapi.json
Official SDKs for TypeScript and Python, a command line and agent skills: SDKs and CLI
Pass webhook_url when you create a generation and we POST the final generation to it when it completes, fails or is canceled. The URL must be public HTTPS.
Every delivery is signed with your webhook secret using the Standard Webhooks scheme: the webhook-id, webhook-timestamp and webhook-signature headers. Verify the signature before trusting the body, and use webhook-id to ignore duplicates.
import crypto from "node:crypto";
// secret: whsec_... from the console. body: the raw request body string.
export function verify(secret, headers, body) {
const id = headers["webhook-id"];
const ts = headers["webhook-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = crypto.createHmac("sha256", key).update(`${id}.${ts}.${body}`).digest("base64");
return headers["webhook-signature"].split(" ").some((s) => {
const sig = s.split(",")[1] ?? "";
return sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
});
}Answer with any 2xx within ten seconds. Otherwise we retry with backoff for 24 hours. You can see every delivery and resend one from the console.