Render API
Introduction
The Render API renders images or PDFs. Unlike the template API, the render API does not require you to create template beforehand. The following is a list of the available endpoints:
Method | URL | Credits | Description |
---|
POST | /render | 1 | Render an image or PDF |
GET | /render/{renderId} | 0 | Get the result of a previously rendered file |
Basic usage
curl --location --request POST 'https://api.tailrender.com/render' \
--header 'Authorization: {{ YOUR_API_KEY_HERE }}' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "pdf",
"html": "<div class=\"text-green-600\">My first PDF render.</div>"
}'
{
"id": "MELxPXnwI5EDIuXAnm9Q",
"props": {},
"status": "COMPLETED",
"result": {
"pdfUrl": "https://tailrender-api.s3.amazonaws.com/pdf/MELxPXnwI5EDIuXAnm9Q.pdf",
"url": "https://tailrender-api.s3.amazonaws.com/pdf/MELxPXnwI5EDIuXAnm9Q.pdf"
}
}