> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Magic Mix

> This endpoint allows you to magic mix image and prompt to produce an catching images.

<img src="https://mintcdn.com/mod/Xe_I2k0P2zG5615S/images/enterprise-api/image-editing/assets/images/Magic-Mix-e6b47757a52a10565eeb39168c78761b.jpg?fit=max&auto=format&n=Xe_I2k0P2zG5615S&q=85&s=5020a86799773554b2eecb707bd314b2" alt="Magic-Mix endpoint result" width="691" height="518" data-path="images/enterprise-api/image-editing/assets/images/Magic-Mix-e6b47757a52a10565eeb39168c78761b.jpg" />

<Warning>
  Make sure you add your [s3 details](/enterprise-api/general/update-s3-details) for `image_editing` server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after **24hours**
</Warning>

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body to the endpoint.

```curl curl  theme={null}
--request POST 'https://modelslab.com/api/v1/enterprise/image_editing/magic_mix' \
```

## Body Attributes

<ParamField body="key" type="string" required>
  Your API Key used for request authorization
</ParamField>

<ParamField body="prompt" type="string" required>
  Text prompt with description of the things you want in the image to be generated
</ParamField>

<ParamField body="negative_prompt" type="string">
  Items you don't want in the image
</ParamField>

<ParamField body="image" type="string" required>
  URL of the image you want magic mix
</ParamField>

<ParamField body="width" type="integer">
  Max Width. Default: `768`
</ParamField>

<ParamField body="height" type="integer">
  Max Height. Default: `768`
</ParamField>

<ParamField body="kmin" type="number">
  Optional. Minimum k value. Default: `0.3`
</ParamField>

<ParamField body="kmax" type="number">
  Optional. Maximum k value. Default: `0.5`
</ParamField>

<ParamField body="mix_factor" type="number">
  Optional. Mix factor for the task. Default: `0.5`
</ParamField>

<ParamField body="steps" type="integer">
  Number of denoising steps (minimum: 1; maximum: 50). Default: `20`
</ParamField>

<ParamField body="samples" type="integer">
  Number of images to be returned in response. The maximum value is 1.
</ParamField>

<ParamField body="seed" type="integer">
  Seed is used to reproduce results. Same seed will give you same image again. Pass `null` for random seed.
</ParamField>

<ParamField body="webhook" type="string">
  Set an URL to get a POST API call once the image generation is complete.
</ParamField>

<ParamField body="track_id" type="string">
  This ID is returned in the response to the webhook API call. This will be used to identify the webhook request.
</ParamField>

## Body

```json json theme={null}
{    
  "key":"",    
  "prompt":"Bed",    
  "height":768,    
  "width":768,    
  "image":"https://user-images.githubusercontent.com/59410571/209578593-141467c7-d831-4792-8b9a-b17dc5e47816.jpg",    
  "kmax":0.5,    
  "kmin":0.3,    
  "mix_factor":0.5,    
  "samples":1,    
  "negative_prompt":"low quality",    
  "seed":1829183163,    
  "steps":20,    
  "webhook": null,    
  "track_id": null 
}
```
