Images

Expand an image to a new aspect ratio (outpainting)

Generates the missing area around an image so it fills a different aspect ratio.

Give the image either as a library file uuid (file_uuid) or INLINE as a base64 data URL (imageData), not both. targetAspectRatio must be one of the ratios GET /v1/models reports for this tool.

post/v1/images/expand

Request

  • Base URL: https://contentmaschine.ai/api
  • URL: https://contentmaschine.ai/api/v1/images/expand
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)

Request body

file_uuidstring uuid

Uuid of a library image to expand. Use this or imageData.

imageDatastring

Base64 data URL of the image to expand. Use this or file_uuid.

targetAspectRatiostring required

Target ratio, e.g. "16:9".

contextPromptstring

Optional hint describing what should fill the new area.

modelVariantstring

Model variant. Defaults to standard.

modelOptionsobject

Per-model options; see GET /v1/models.

Response

The expanded image.

successboolean
dataobject
timestampstring date-time

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.