---
title: "Reframe an image to a new aspect ratio"
method: POST
path: "/images/reframe"
tags: ["Images"]
---

# Reframe an image to a new aspect ratio

`POST /images/reframe`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/images/reframe`
- Auth: API key in header `Authorization`

Extends `input.image_url` to `input.aspect_ratio` (width:height, like 9:16) by generating new margins around it, keeping every original pixel centered. Use it to fit one image to a story, square or feed post without cropping; to change what is in the image use `POST /v1/images/edit`. Takes PNG, JPEG or WebP; a canvas over 25 megapixels is scaled down. Returns the queued job immediately; poll `GET /v1/jobs/{id}` for status and results. Credits are charged only when the job completes successfully.

## Headers

- `Idempotency-Key` string

## Request body

- ReframeImageRequest
  - `model` string: any fal.ai endpoint id runs as sent. Defaults to fal-ai/bria/expand.
  - `input` object, required: Extend an image to a new aspect ratio, keeping the original untouched. Files: a URL, a `file_…` id from `POST /v1/files`, or a base64 data URI up to 10 MB.
    - `image_url` string, required: The source file.
    - `aspect_ratio` string, required: Target shape as width:height.
    - `prompt` string: Optional description of what fills the new area.

## Response `202`

Job queued

- ProviderJob
  - `id` string, required
  - `object` string, required
  - `type` string, required
  - `status` 'queued' | 'processing' | 'completed' | 'failed' | 'cancelled', required
  - `model` string, required
  - `progress` integer, required
  - `input` object, required
  - `result` object, nullable, required
  - `error` string, nullable, required
  - `error_code` string, nullable, required
  - `credits_used` integer, nullable, required
  - `provider_request_id` string, nullable, required
  - `created_at` string, date-time, required
  - `started_at` string, date-time, nullable, required
  - `completed_at` string, date-time, nullable, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `402`: Insufficient credits
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

## Changes

- **2026-11-23** `9ec2903dfd7f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/images/reframe/post.md)

---

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