Create image from text - Mystic
Convert descriptive text input into images using AI. This endpoint accepts a variety of parameters to customize the generated images.
Important
Mystic image generation mode is Freepik’s exclusive advanced AI workflow for ultra-realistic, high-resolution images.
Mystic is available on beta access only for premium API users. Make sure you get your webhook set up on every request in order to retrieve your generations.
You can upgrade your account here, no upfront payments or precommitment. You will only pay for what you use.
Pricing
Resolution | Price per Image |
---|---|
2K | 0.10€ |
4K | 0.32€ |
Authorizations
Your Freepik API key. Required for authentication. Learn how to obtain an API key
Headers
The Content-Type
header must be set to application/json
to indicate that the payload is formatted as JSON.
If a different Content-Type
is provided, the payload will be ignored, and the request will proceed without
processing the body.
Body
Prompt for the AI model
Resolution of the image
2k
, 4k
Image size with the aspect ratio. The aspect ratio is the proportional relationship between an image's width and height, expressed as *_width_height (e.g., square_1_1, widescreen_16_9). It is calculated by dividing the width by the height.
If not present, the default is square_1_1
.
square_1_1
, classic_4_3
, traditional_3_4
, widescreen_16_9
, social_story_9_16
, smartphone_horizontal_20_9
, smartphone_vertical_9_20
, standard_3_2
, portrait_2_3
, horizontal_2_1
, vertical_1_2
, social_5_4
, social_post_4_5
Experimental feature: it tries to give an extra boost of reality to your images, a kind of "less AI look". Works especially well with photographs but it also magically works with illustrations too. IMPORTANT: deactivate it if you are trying to generate something that is really fantastic or a known character, otherwise it won't follow your prompt well.
Higher values can achieve greater detail per pixel at higher resolutions at the cost of giving a somewhat more "HDR" or artificial look.
Very high values can generate quite crazy things like eyes where they shouldn't appear, etc.
Valid values range [0, 100]
, default 33
0 < x < 100
Select the engine for the AI model. Available options:
automatic
- default choiceIllusio
- for smoother illustrations, landscapes, and nature. The softer looking one.Sharpy
- better for realistic images like photographs and for a more grainy look. It provides the sharpest and most detailed images. If you use it for illustrations it will give them more texture and a less softer look.Sparkle
- also good for realistic images. It's a middle ground between Illusio and Sharpy.
automatic
, magnific_illusio
, magnific_sharpy
, magnific_sparkle
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.
Webhook URL to notify the user when the task is completed
Response
Was this page helpful?