Images

Apply the style of one image to another

Re-renders the content image in the visual style of the style image.

Give each image either as a library file uuid (file_uuid for the content image, style_file_uuid for the style reference) or INLINE as a base64 data URL (contentImage, styleImage). One of each pair is required; sending both of a pair is a 400. Returns when the image is ready; there is no job to poll.

post/v1/images/style-transfer

Request

  • Base URL: https://contentmaschine.ai/api
  • URL: https://contentmaschine.ai/api/v1/images/style-transfer
  • 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 restyle (the content image). Use this or contentImage.

style_file_uuidstring uuid

Uuid of a library image whose style is applied. Use this or styleImage.

contentImagestring

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

styleImagestring

Base64 data URL of the style reference. Use this or style_file_uuid.

styleStrengthnumber float

How strongly the style is applied.

modelVariantstring

Model variant. Defaults to standard.

modelOptionsobject

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

Response

The restyled image.

successboolean
dataobject
timestampstring date-time

Example response

{
  "success": true
}

Changes

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