# fastapi.online — Image Pad (Add Padding to Image)

> fastapi.online — Image Pad (Add Padding to Image) is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Pads an uploaded image with a solid color to reach a specified target width and height.

## Facts

- Endpoint: POST https://api.fastapi.online/image-pad
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-image-pad-add-padding-to-image-91f784a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iyiwpR8IFYId7Wg6zvIVo

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastapi-online-image-pad-add-padding-to-image-91f784a5 -d '<json body>'
```

Example prompt: Pad my product photo to exactly 1080x1080 pixels using a white background — keep the original image centered and don't stretch it.

## When to prefer this

Use this endpoint when you need to non-destructively extend image canvas dimensions by adding a solid-color border/padding without cropping or scaling the original content. Ideal for making images fit fixed-size templates, preparing square thumbnails, or letterboxing. Prefer over crop or resize endpoints when preserving the original image content at its original scale is required.

## Known failure modes

- Unsupported file format returns an error (only PNG, JPEG, WebP accepted)
- Target dimensions smaller than the original image may produce unexpected results or an error
- Invalid color string (unrecognized format) may default or fail
- Missing required fields (file, target_width, target_height) return validation error
- Payment failure or insufficient USDC balance returns 402

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a padded image file (PNG/JPEG/WebP) with the original image centered and the specified solid color filling the added border area to reach the target width and height.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG/JPEG/WebP)"
  },
  "color": {
   "type": "string"
  },
  "target_width": {
   "type": "string"
  },
  "target_height": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-image-pad-add-padding-to-image-91f784a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
