---
title: "Style Transfer - Transform image style"
method: POST
path: "/v1/ai/image-style-transfer"
tags: ["image-style-transfer"]
---

# Style Transfer - Transform image style

`POST /v1/ai/image-style-transfer`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/image-style-transfer`
- Auth: API key in header `x-magnific-api-key`

## Request body

- StyleTransferRequestContent
  - `image` string, required: Base64 or URL of the image to do the style transfer
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
  - `reference_image` string, required: Base64 or URL of the reference image for style transfer
  - `prompt` string: Prompt for the AI model
  - `style_strength` integer: Percentage of style strength
  - `structure_strength` integer: Allows to maintain the structure of the original image
  - `is_portrait` boolean: Indicates whether the image should be processed as a portrait. When set to `true`, portrait-specific enhancements such as style and beautification can be applied.
  - `portrait_style` 'standard' | 'pop' | 'super_pop': Optional setting to define the visual style applied to portrait images. Only used if `is_portrait` is `true`. The available options adjust the stylization level or aesthetic treatment of the portrait.
  - `portrait_beautifier` 'beautify_face' | 'beautify_face_max': Optional setting to enable facial beautification on portrait images. Only used if `is_portrait` is `true`. Options control the intensity or type of beautification applied.
  - `flavor` 'faithful' | 'gen_z' | 'psychedelia' | 'detaily' | 'clear' | 'donotstyle' | 'donotstyle_sharp': Flavor of the transferring style
  - `engine` 'balanced' | 'definio' | 'illusio' | '3d_cartoon' | 'colorful_anime' | 'caricature' | 'real' | 'super_real' | 'softy': Magnific model engines
  - `fixed_generation` boolean: When this option is enabled, using the same settings will consistently produce the same image. Fixed generations are ideal for fine-tuning, as it allows for incremental changes to parameters (such as the prompt) to see subtle variations in the output. When disabled, expect each generation to introduce a degree of randomness, leading to more diverse outcomes.

## Response `200`

OK - The request has succeeded and the Style Transfer process has started.

- ApplyStyleTransferToImage200Response
  - `task_id` string, uuid, required: Task identifier
  - `task_status` 'IN_PROGRESS' | 'CREATED' | 'COMPLETED' | 'FAILED', required: Task status
  - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
