---
title: "Upscale an image"
method: POST
path: "/images/upscale"
tags: ["images"]
---

# Upscale an image

`POST /images/upscale`

## Request

- Base URL: `https://api.krater.ai/v1`
- URL: `https://api.krater.ai/v1/images/upscale`
- Auth: HTTP bearer

Upscale an image with the Crystal upscaler. The scale factor is clamped to supported values (2x or 4x) and credits are charged based on the output size in megapixels.

## Request body

- ImageUpscaleRequest
  - `image_url` string, uri, required: Public URL of the image to upscale.
  - `scale` number: Upscale factor, clamped to supported values (2 or 4).

## Response `200`

Upscaled image URL.

- ImageResponse
  - `created` integer, required: Unix timestamp.
  - `data` object[], required
    - `url` string, uri, required: URL of the generated image.

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing or invalid API key. Pass Authorization: Bearer kr_live_...
- `402`: Not enough credits, or the API key's daily credit cap is reached.
- `429`: Rate limit exceeded (default 60 requests per minute per key). Includes a Retry-After header.

---

[API](https://skmtc.dev/krater/apis/krater-api.md) - [All operations](https://skmtc.dev/krater/apis/krater-api/llms.txt) - [OpenAPI document](https://skmtc.dev/krater/apis/krater-api/revisions/66005541188c?raw)
