Generate a diagram
Costs one credit, also to refine a creative diagram. Returns the completed generation with its SVG; a failed generation is refunded. With callbackUrl, returns 202 once the generation is admitted and POSTs the completed generation ({ status: "ok", item }) or its error ({ status: "error", error, code, generationId }) to that URL. The request's x-client-action-id is stored, so a client that lost the response can find the generation.
POST
https://svgdiagram.ai/rest/v1/generationsAuthorisation
Returns
201
Generated diagram
202
Generation admitted; its result goes to callbackUrl
400
Invalid request, options, or export
402
No credit or billing entitlement
404
Unknown design, or the generation to try again from or refine was not found
422
The chosen design does not fit the request
502
The model or renderer failed
503
At capacity