# Aspect Ratio Converter

> Agent skill on puras — published by puras. Resizes a single image to the aspect ratios you need (9:16, 4:5, 1:1, 16:9). Pick a clean center-crop, or let it intelligently re-compose the scene to fill the new frame — no bars, no empty edges.

- **Skill path:** `puras/game-ad-studio/aspect-ratio-converter`
- **Skillpack:** Game Ad Studio (`game-ad-studio`)
- **Skillpack ID:** `0dac04f5-5e73-44d7-8c47-adc9977250e5`
- **Deployment version:** v74
- **Human page:** https://puras.co/skills/puras/game-ad-studio/aspect-ratio-converter
- **API base:** `https://api.puras.co`

## Description

Resizes a single image to the aspect ratios you need (9:16, 4:5, 1:1, 16:9). Pick a clean center-crop, or let it intelligently re-compose the scene to fill the new frame — no bars, no empty edges.

## Who it's for

- **Performance marketers** — Get every placement size from a single creative.
- **Designers & content teams** — Skip manual reframing for each channel.
- **Developer & product teams** — Reframe user or catalog images programmatically.

## Aspect Ratio Converter vs Cropping by hand

| | Cropping by hand | puras |
| --- | --- | --- |
| Reframe | Crop each ratio manually | Every ratio from one image |
| Empty edges | Letterbox bars or awkward crops | Re-composed to fill the frame |
| Volume | One image at a time | Batch over one API |
| Pricing | Designer time | Usage-based — pay per run, exact cost each time |

## FAQ

### Which aspect ratios does it support?

9:16, 4:5, 1:1, and 16:9 from a single source image.

### How is this better than a plain crop?

As well as a clean center-crop, it can intelligently re-compose the scene to fill the new frame, so you avoid bars and empty edges.

### Can I resize many images at once?

Yes — call it over one API to reframe assets at scale.

### Can I use it in my own app?

Yes — it's API-native; integrate it with one API key.

## Try it free

Aspect Ratio Converter has a free in-browser playground on its page (https://puras.co/skills/puras/game-ad-studio/aspect-ratio-converter) — load an example or bring your own inputs and run it with a Google sign-in. No credit card, no subscription; runs are usage-based after the free try.

## Input schema

```json
{
  "type": "object",
  "required": [
    "image",
    "mode",
    "target_ratios"
  ],
  "properties": {
    "mode": {
      "enum": [
        "generative",
        "crop"
      ],
      "type": "string",
      "default": "generative",
      "description": "`generative` re-composes the scene with AI; `crop` center-crops, no AI."
    },
    "image": {
      "type": "image",
      "description": "Source image to convert — any aspect ratio."
    },
    "notes": {
      "type": "string",
      "maxLength": 200,
      "description": "Optional — subject to keep, or element to emphasize."
    },
    "target_ratios": {
      "type": "array",
      "items": {
        "enum": [
          "9:16",
          "4:5",
          "1:1",
          "16:9"
        ],
        "type": "string"
      },
      "minItems": 1,
      "description": "Target ratios to produce. Pick one or more.",
      "uniqueItems": true
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "conversions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "output_url": {
            "type": "image",
            "description": "Drive path to the converted image; served to readers as a stable media URL. The playground renders it with <img>."
          },
          "aspect_ratio": {
            "enum": [
              "9:16",
              "4:5",
              "1:1",
              "16:9"
            ],
            "type": "string"
          }
        }
      },
      "minItems": 1,
      "description": "The image produced for each selected target ratio — one per ratio."
    }
  }
}
```

## Examples

### Generative · landscape → vertical

Re-composes the 16:9 key art for 9:16.

Inputs:

```json
{
  "mode": "generative",
  "image": "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/coc_output_4x3.webp",
  "target_ratios": [
    "9:16"
  ]
}
```

Outputs:

```json
{
  "conversions": [
    {
      "output_url": "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/coc_converted_9x16.png",
      "aspect_ratio": "9:16"
    }
  ]
}
```

### Crop · landscape → vertical

Inputs:

```json
{
  "mode": "crop",
  "image": "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/mergedragons_screenshot.webp",
  "target_ratios": [
    "9:16"
  ]
}
```

Outputs:

```json
{
  "conversions": [
    {
      "output_url": "https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/md_converted_9x16.png",
      "aspect_ratio": "9:16"
    }
  ]
}
```

## Use this skill

puras runs this skill on its own backend — you send inputs and get the result back. Three ways to call, fastest first:

### 1. MCP server — recommended for coding agents, no API key

Connect the puras MCP server; auth is OAuth in the browser on first call, so there is nothing to paste.

```bash
claude mcp add --transport http puras https://mcp.puras.co/mcp
```

Any MCP client works — point it at `https://mcp.puras.co/mcp` (HTTP transport). Then ask the agent to run `aspect-ratio-converter` from skillpack `puras/game-ad-studio` with your inputs.

### 2. CLI / Python SDK — `pip install puras`

```bash
pip install puras
puras login            # or set PURAS_API_KEY
puras run puras/game-ad-studio/aspect-ratio-converter -i key=value
```

From Python:

```python
import puras

client = puras.Client()   # PURAS_API_KEY from env
result = client.run("puras/game-ad-studio/aspect-ratio-converter", {"mode":"generative","image":"https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/coc_output_4x3.webp","target_ratios":["9:16"]})
```

### 3. HTTP API

`wait=true` blocks until the run reaches a terminal status and returns the result inline.

```bash
curl -X POST "https://api.puras.co/v1/jobs?skillpack=puras/game-ad-studio&wait=true" \
  -H "Authorization: Bearer $PURAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"skill":"aspect-ratio-converter","inputs":{"mode":"generative","image":"https://uozfqcfhlhugotnevscg.supabase.co/storage/v1/object/public/puras-public-skills/coc_output_4x3.webp","target_ratios":["9:16"]}}'
```

Mint an API key (for CLI / SDK / API) from https://puras.co/api-keys.

## Pricing

Runs are billed usage-based from your workspace credit balance — the cost of a job is the sum of the model token (and any media) usage it incurs. There is no per-call platform fee. The playground and the job result report the exact cost of each run.

- Pricing page: https://puras.co/pricing
- Machine-readable model price registry: `https://api.puras.co/v1/pricing`
