---
title: "Process an image"
method: POST
path: "/api/images"
tags: ["Images"]
---

# Process an image

`POST /api/images`

## Request

- Base URL: `https://api.imagelato.com`
- URL: `https://api.imagelato.com/api/images`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

Uploads a base64 image and resizes/reformats it to the requested sizes and formats (or those of a named template), returning a batch of CDN URLs. Emits the `batch.created` webhook event. Requires the `images:write` scope.

## Request body

- object
  - `file` string, required: Data URI, e.g. `data:image/png;base64,<...>`
  - `projectId` string
  - `slug` string
  - `template` string
  - `formats` string[]
  - `sizes` integer[]

## Response `200`

The created batch (main URL + variants)

## Other responses

- `401`: Missing or invalid credentials
- `403`: API key is missing the `images:write` scope
- `429`: API key rate limit exceeded

---

[API](https://skmtc.dev/imagelato/apis/imagelato-api.md) · [All operations](https://skmtc.dev/imagelato/apis/imagelato-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imagelato/apis/imagelato-api/revisions/3e3c7553a1bb?raw)
