inference.recraft.txt2img.v1
The inference.recraft.txt2img.v1 job generates an image from a text prompt using Recraft V3.
{ "type": "inference.recraft.txt2img.v1", "config": { "prompt": "a serene mountain landscape at golden hour" }}Additional configuration:
negative_prompt(string)style_id(string)style(string; one ofrealistic_image,digital_illustration,vector_illustration,icon,logo_raster; defaultrealistic_image)substyle(string; one ofb_and_w,enterprise,evening_light,faded_nostalgia,forest_life,hard_flash,hdr,motion_blur,mystic_naturalism,natural_light,natural_tones,organic_calm,real_life_glow,retro_realism,retro_snapshot,studio_portrait,urban_drama,village_realism,warm_folk,2d_art_poster,antiquarian,bold_fantasy,child_book,crosshatch,3d,80s,glow,pixel_art,bold_stroke,chemistry,colored_stencil,cosmics,cutout,editorial,cartoon,doodle_line_art,engraving,flat_2,broken_line,colored_outline,doodle_fill,offset_fill,pictogram,emblem_graffiti,emblem_pop_art,emblem_punk,emblem_stamp,emblem_vintage)size(string; one of1024x1024,1024x1280,1024x1365,1024x1434,1024x1536,1024x1707,1024x1820,1024x2048,1280x1024,1365x1024,1434x1024,1536x1024,1707x1024,1820x1024,2048x1024; default1024x1024)text_layout(array)controls(object)
This job type is also available under its partner alias inference.partner.recraft.txt2img.v1.
Schema
Section titled “Schema”{ "type": "object", "required": [ "type", "config" ], "properties": { "type": { "type": "string" }, "config": { "type": "object", "additionalProperties": false, "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "minLength": 0, "maxLength": 1000, "examples": [ "puppies in a cloud, 4k" ] }, "negative_prompt": { "type": "string", "description": "Description of undesired image elements" }, "style_id": { "type": "string", "format": "uuid", "description": "Reference to a previously uploaded style (mutually exclusive with style parameter)" }, "style": { "type": "string", "default": "realistic_image", "description": "Style of generated images", "enum": [ "realistic_image", "digital_illustration", "vector_illustration", "icon", "logo_raster" ] }, "substyle": { "type": "string", "description": "Substyle within the chosen style category", "enum": [ "b_and_w", "enterprise", "evening_light", "faded_nostalgia", "forest_life", "hard_flash", "hdr", "motion_blur", "mystic_naturalism", "natural_light", "natural_tones", "organic_calm", "real_life_glow", "retro_realism", "retro_snapshot", "studio_portrait", "urban_drama", "village_realism", "warm_folk", "2d_art_poster", "antiquarian", "bold_fantasy", "child_book", "crosshatch", "3d", "80s", "glow", "pixel_art", "bold_stroke", "chemistry", "colored_stencil", "cosmics", "cutout", "editorial", "cartoon", "doodle_line_art", "engraving", "flat_2", "broken_line", "colored_outline", "doodle_fill", "offset_fill", "pictogram", "emblem_graffiti", "emblem_pop_art", "emblem_punk", "emblem_stamp", "emblem_vintage" ] }, "size": { "type": "string", "default": "1024x1024", "enum": [ "1024x1024", "1024x1280", "1024x1365", "1024x1434", "1024x1536", "1024x1707", "1024x1820", "1024x2048", "1280x1024", "1365x1024", "1434x1024", "1536x1024", "1707x1024", "1820x1024", "2048x1024" ] }, "text_layout": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "text", "bbox" ], "properties": { "text": { "type": "string" }, "bbox": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": 0, "maximum": 1 } } } } } }, "controls": { "type": "object", "additionalProperties": false, "required": [ "colors" ], "properties": { "colors": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "rgb" ], "properties": { "rgb": { "type": "array", "minLength": 3, "maxLength": 3, "items": { "type": "integer", "minimum": 0, "maximum": 255 } } } } }, "background_color": { "type": "object", "additionalProperties": false, "required": [ "rgb" ], "properties": { "rgb": { "type": "array", "minLength": 3, "maxLength": 3, "items": { "type": "integer", "minimum": 0, "maximum": 255 } } } } } } } } }, "$schema": "https://json-schema.org/draft/2020-12/schema"}