---
title: "Image Resize (x402)"
method: GET
path: "/x402/v2/image-resize"
tags: ["x402"]
---

# Image Resize (x402)

`GET /x402/v2/image-resize`

## Request

- Base URL: `https://api.strale.io`
- URL: `https://api.strale.io/x402/v2/image-resize`
- Auth: none required

Resize, crop, and convert images. Supports PNG, JPEG, WebP. Configurable dimensions, quality, fit mode. Uses Sharp.

## Query parameters

- `fit` 'cover' | 'contain' | 'fill' | 'inside' | 'outside': cover, contain, fill, inside, outside
- `base64` string
- `format` 'png' | 'jpeg' | 'webp': png, jpeg, or webp
- `quality` integer
- `image_url` string
- `target_width` integer
- `target_height` integer

## Response `200`

Success

- object
  - `width` integer
  - `base64` string
  - `height` integer
  - `size_bytes` integer
  - `content_type` string

## Other responses

- `402`: Payment required (x402 — pay with USDC on Base)

---

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