recraft-ai/recraft-v4-styles-svg
Recraft V4 Styles SVG generates editable vector images that match a reusable style or attached reference images.
Run recraft-ai/recraft-v4-styles-svg with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| prompt |
string
|
Text prompt for image generation (up to 10,000 characters)
|
|
| aspect_ratio |
None
|
Not set
|
Aspect ratio of the generated image
|
| size |
None
|
1024x1024
|
Width and height of the generated image. Size is ignored if an aspect ratio is set.
|
| style_id |
string
|
|
Reusable Recraft style ID created with the Create style endpoint. Mutually exclusive with style_reference_images.
|
| style_reference_images |
array
|
PNG, JPG, or WEBP reference images used to create a private style for this generation. Supports 1-10 images. Mutually exclusive with style_id.
|
|
| style_match |
None
|
precise
|
How closely the generated image should follow the style.
|
{
"type": "object",
"title": "Input",
"required": [
"prompt",
"style_reference_images"
],
"properties": {
"size": {
"enum": [
"1024x1024",
"1536x768",
"768x1536",
"1280x832",
"832x1280",
"1216x896",
"896x1216",
"1152x896",
"896x1152",
"832x1344",
"1280x896",
"896x1280",
"1344x768",
"768x1344"
],
"type": "string",
"title": "size",
"description": "Width and height of the generated image. Size is ignored if an aspect ratio is set.",
"default": "1024x1024",
"x-order": 2
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "Text prompt for image generation (up to 10,000 characters)"
},
"style_id": {
"type": "string",
"title": "Style Id",
"default": "",
"x-order": 3,
"description": "Reusable Recraft style ID created with the Create style endpoint. Mutually exclusive with style_reference_images."
},
"style_match": {
"enum": [
"precise",
"flexible"
],
"type": "string",
"title": "style_match",
"description": "How closely the generated image should follow the style.",
"default": "precise",
"x-order": 5
},
"aspect_ratio": {
"enum": [
"Not set",
"1:1",
"4:3",
"3:4",
"3:2",
"2:3",
"16:9",
"9:16",
"1:2",
"2:1",
"14:10",
"10:14",
"4:5",
"5:4",
"6:10"
],
"type": "string",
"title": "aspect_ratio",
"description": "Aspect ratio of the generated image",
"default": "Not set",
"x-order": 1
},
"style_reference_images": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Style Reference Images",
"x-order": 4,
"description": "PNG, JPG, or WEBP reference images used to create a private style for this generation. Supports 1-10 images. Mutually exclusive with style_id."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "object",
"title": "Output",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri"
},
"style_id": {
"type": "string",
"title": "Style Id",
"nullable": true
}
}
}