Parameter | Type | Description |
---|---|---|
prompt (required) | string | A text description of the desired image(s). The maximum length is 1000 bytes. |
text_layout | Array of objects or null | Available in recraftv3 model only. This topic is covered below. |
n | integer or null, default is 1 | The number of images to generate, must be between 1 and 6. |
style_id | UUID or null | Use a previously uploaded style as a reference, this topic is covered above and below. |
style | string or null, default is realistic_image | The style of the generated images, this topic is covered above. |
substyle | string or null | This topic is covered above. |
model | string or null, default is recraftv3 | The model to use for image generation. Must be one of recraftv3 or recraftv2 . |
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
size | string or null, default is 1024x1024 | The size of the generated images in WxH format, supported values are published below. |
negative_prompt | string or null | A text description of undesired elements on an image. |
controls | object or null | A set of custom parameters to tweak generation process, this topic is covered below. |
style_id
and style
parameters are mutually exclusive. If neither of the two parameters is specified, the default style of realistic_image
will be used
Hint: if OpenAI Python Library is used, non-standard parameters can be passed using the extra_body
argument. For example:
Parameter | Type | Description |
---|---|---|
style (required) | string | The base style of the generated images, this topic is covered above. |
files (required) | files | Images in PNG, JPG, or WEBP format for use as style references. The max number of images is 5. Total size of all images is limited to 5 MB. |
Parameter | Type | Description |
---|---|---|
image (required) | file | An image to modify, must be less than 5 MB in size, have resolution less than 16 MP, and max dimension less than 4096 pixels. |
prompt (required) | string | A text description of areas to change. The maximum length is 1000 bytes. |
strength (required) | float | Defines the difference with the original image, should lie in [0, 1] , where 0 means almost identical, and 1 means minimal similarity. |
n | integer or null, default is 1 | The number of images to generate, must be between 1 and 6. |
style_id | UUID or null | Use a previously uploaded style as a reference, this topic is covered above and below. |
style | string or null, default is realistic_image | The style of the generated images, this topic is covered above. |
substyle | string or null | This topic is covered above. |
model | string or null, default is recraftv3 | The model to use for image generation. Only recraftv3 is supported at the moment. |
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
negative_prompt | string or null | A text description of undesired elements on an image. |
controls | object or null | A set of custom parameters to tweak generation process, this topic is covered below. |
style_id
and style
parameters are mutually exclusive. If neither of the two parameters is specified, the default style of “any"
will be used
'multipart/form-data'
. The image must be no more than 5 MB in size, have resolution no more than 16 MP, max dimension no more than 4096 pixels and min dimension no less than 256 pixels.
Parameter | Type | Description |
---|---|---|
image (required) | file | An image to modify, must be less than 5 MB in size, have resolution less than 16 MP, and max dimension less than 4096 pixels. |
mask (required) | file | An image encoded in grayscale color mode, used to define the specific regions of an image that need modification. The white pixels represent the parts of the image that will be inpainted, while black pixels indicate the parts of the image that will remain unchanged. Should have exactly the same size as the image. Each pixel of the image should be either pure black (value 0 ) or pure white (value 255 ). |
prompt (required) | string | A text description of areas to change. The maximum length is 1000 bytes. |
n | integer or null, default is 1 | The number of images to generate, must be between 1 and 6. |
style_id | UUID or null | Use a previously uploaded style as a reference, this topic is covered above and below. |
style | string or null, default is realistic_image | The style of the generated images, this topic is covered above. |
substyle | string or null | This topic is covered above. |
model | string or null, default is recraftv3 | The model to use for image generation. Only recraftv3 is supported at the moment. |
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
negative_prompt | string or null | A text description of undesired elements on an image. |
style_id
and style
parameters are mutually exclusive. If neither of the two parameters is specified, the default style of “any"
will be used
'multipart/form-data'
. The image must be no more than 5 MB in size, have resolution no more than 16 MP, max dimension no more than 4096 pixels and min dimension no less than 256 pixels.
Parameter | Type | Description |
---|---|---|
image (required) | file | An image to modify, must be less than 5 MB in size, have resolution less than 16 MP, and max dimension less than 4096 pixels. |
prompt (required) | string | A text description of areas to change. The maximum length is 1000 bytes. |
n | integer or null, default is 1 | The number of images to generate, must be between 1 and 6. |
style_id | UUID or null | Use a previously uploaded style as a reference, this topic is covered above and below. |
style | string or null, default is realistic_image | The style of the generated images, this topic is covered above. |
substyle | string or null | This topic is covered above. |
model | string or null, default is recraftv3 | The model to use for image generation. Only recraftv3 is supported at the moment. |
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
negative_prompt | string or null | A text description of undesired elements on an image. |
style_id
and style
parameters are mutually exclusive. If neither of the two parameters is specified, the default style of “any"
will be used
'multipart/form-data'
. The image must be no more than 5 MB in size, have resolution no more than 16 MP, max dimension no more than 4096 pixels and min dimension no less than 256 pixels.
Parameter | Type | Description |
---|---|---|
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
'multipart/form-data'
. The image must be no more than 5 MB in size, have resolution no more than 16 MP, max dimension no more than 4096 pixels and min dimension no less than 256 pixels.
Parameter | Type | Description |
---|---|---|
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
multipart/form-data
. The image must be no more than 5 MB in size, have resolution no more than 4 MP, max dimension no more than 4096 pixels and min dimension no less than 32 pixels.
Parameter | Type | Description |
---|---|---|
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
multipart/form-data
. The image must be no more than 5 MB in size, have resolution no more than 16 MP, max dimension no more than 4096 pixels and min dimension no less than 256 pixels.
Parameter | Type | Description |
---|---|---|
response_format | string or null, default is url | The format in which the generated images are returned. Must be one of url or b64_json . |
Parameter | Type | Description |
---|---|---|
artistic_level | integer or null | Defines the artistic tone of your image. At a simple level, the person looks straight at the camera in a static and clean style. Dynamic and eccentric levels introduce movement and creativity. The value should be in the range [0..5] . |
colors | array of color definitions | An array of preferable colors. |
background_color | color definition | Use the given color as a desired background color. |
no_text | bool | Do not embed text layouts. |
0...255
defining RGB color model. |
Example
text
field must contain a single word composed only of the following characters: