---
title: "Image generation API — Pixmato"
description: "Generate PNG, JPEG, WebP, and PDF outputs from your Pixmato templates. Use synchronous rendering, asynchronous jobs, and workspace API keys."
url: https://pixmato.com/api
---

# Generate images from your own code.

Send a template ID and the values that change. The API returns a finished image or PDF that your application can store, publish, or send.

[Read the quickstart](https://pixmato.com/docs/quickstart) [Create an account](https://app.pixmato.com/signup?source=site)

The endpoints you will use most

[POST `/v1/renders` Generate an image or PDF.](https://pixmato.com/docs/api-reference/renders/create)[GET `/v1/renders/{id}` Retrieve status and output.](https://pixmato.com/docs/api-reference/renders/get)[GET `/v1/templates` Find workspace templates.](https://pixmato.com/docs/api-reference/templates/list)[GET `/v1/usage/allowance` Check remaining render credits.](https://pixmato.com/docs/api-reference/render-credits)

Example request body`POST /v1/renders`

```
{
  "template": "YOUR_TEMPLATE_ID",
  "modifications": {
    "headline": "The weekend starts here",
    "discount": "30% off"
  },
  "output": {
    "format": "png",
    "scale": 1
  }
}
```

Use your saved template ID and the parameter names exposed in its API tab. Send the API key as an Authorization bearer header.

## Synchronous or asynchronous

By default a request waits for the finished file. Add the header Prefer: respond-async to get a job ID straight away and check for the result later.

## One image per request

Change the parameter values for each image you need. Each request has its own job ID, status, and output.

## Render history

Every request is recorded with its status, result, and any error, so you can see what was sent and what came back.

## PNG, JPEG, WebP, or PDF

Choose the format and scale in each request. The response includes a URL for the finished file.
