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

imagestring required

Base64 or URL of the image to do the style transfer

webhook_urlstring 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_imagestring required

Base64 or URL of the reference image for style transfer

promptstring

Prompt for the AI model

style_strengthinteger

Percentage of style strength

structure_strengthinteger

Allows to maintain the structure of the original image

is_portraitboolean

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_generationboolean

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.

Example request

{
  "webhook_url": "https://www.example.com/webhook"
}

Response

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

task_idstring uuid required

Task identifier

task_status'IN_PROGRESS' | 'CREATED' | 'COMPLETED' | 'FAILED' required

Task status

generatedstring[] required

Example response

{
  "task_status": "IN_PROGRESS",
  "generated": [
    "https://openapi-generator.tech",
    "https://openapi-generator.tech"
  ],
  "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}

Changes

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