Recraft 20b
/v1/runRecraft 20b is Recraft's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.
Request body
Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.
Model identifier. Set to recraft/recraft-20b.
Default: recraft/recraft-20b
Text prompt that describes the image or asset to generate.
The aspect ratio of the generated image.
Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16
The style of the generated images. Vector images cost 2X as much.
Allowed values: any, realistic_image, digital_illustration, vector_illustration, realistic_image/b_and_w, realistic_image/enterprise, realistic_image/hard_flash, realistic_image/hdr, realistic_image/motion_blur, realistic_image/natural_light, realistic_image/studio_portrait, digital_illustration/2d_art_poster, digital_illustration/2d_art_poster_2, digital_illustration/3d, digital_illustration/80s, digital_illustration/engraving_color, digital_illustration/glow, digital_illustration/grain, digital_illustration/hand_drawn, digital_illustration/hand_drawn_outline, digital_illustration/handmade_3d, digital_illustration/infantile_sketch, digital_illustration/kawaii, digital_illustration/pixel_art, digital_illustration/psychedelic, digital_illustration/seamless, digital_illustration/voxel, digital_illustration/watercolor, vector_illustration/cartoon, vector_illustration/doodle_line_art, vector_illustration/engraving, vector_illustration/flat_2, vector_illustration/kawaii, vector_illustration/line_art, vector_illustration/line_circuit, vector_illustration/linocut, vector_illustration/seamless
Default: realistic_image
An array of preferable colors
Default:
The ID of the custom style reference (optional)
Response Schema
The submit endpoint returns an accepted generation task. Poll the result endpoint with the returned id for terminal outputs or errors.
Error message if the task failed. Empty on success.
Unique identifier for the generation task.
Model ID used for the prediction.
Array of generated content. Empty when status is not completed.
Status of the task: pending, running, completed, failed, or timeout.
Allowed values: pending, running, completed, failed, timeout
Model capabilities
Capabilities declared by the model registry.
Default: text-to-image
Execution mode declared by the model registry.
Default: async

