outpaint

Extend image borders to a target aspect ratio using OpenAI's image edit endpoint.

3|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/mattwoodco/skills --skill outpaint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: outpaint
Source: https://github.com/mattwoodco/skills/tree/main/v1-skills/outpaint
Command: npx skills add https://github.com/mattwoodco/skills --skill outpaint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, sharp, storage, env-config, auth, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows users to seamlessly extend the borders of an image to meet a target aspect ratio, using AI to naturally fill in the new background.

Core Features & Use Cases

  • AI-Powered Outpainting: Extends images using OpenAI's DALL-E 2 model.
  • Aspect Ratio Conversion: Resizes images to specific dimensions while maintaining content integrity.
  • Use Case: You have a square image that needs to fit a vertical social media story format. This skill will intelligently expand the image's background to match the required dimensions.

Quick Start

Use the outpaint skill to extend the attached image 'photo.jpg' to a target width of 1280 and a target height of 720.

Frequently Asked Questions about outpaint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use AI outpainting to extend an image's borders to a different aspect ratio?

You can use AI outpainting to extend an image's borders to a target aspect ratio by sending the image to OpenAI's image edit endpoint. The AI naturally fills in the new background to match your specified dimensions.

Can I convert a square image to a vertical format for social media stories?

Yes, you can convert a square image to a vertical social media story format. The AI intelligently expands the image's background to match the required vertical dimensions without cropping the original content.

Do I need an OpenAI API key to perform AI image extension?

Yes, an OpenAI API key is required to perform AI image extension. The processing logic relies on OpenAI's DALL-E 2 image edit endpoint to generate the new background pixels.

What's the best way to resize images to specific dimensions while maintaining content integrity?

Using AI outpainting with sharp for image processing is the best way to resize images while maintaining content integrity. It extends borders to target dimensions via a Next.js API route instead of cropping.

Does AI outpainting work with Next.js API routes for server-side image processing?

Yes, AI outpainting works with Next.js API routes for server-side image processing. It supports both server-side processing and client-side integration for dynamic image manipulation using sharp and OpenAI.

Why does AI outpainting require sharp for image resizing?

AI outpainting requires sharp for image resizing to prepare and manipulate the original image boundaries before sending it to the OpenAI image edit endpoint. Sharp ensures the input image matches the structural requirements for accurate border extension.