Recraft V4 Pro
Text-to-Image • Recraft • ProxiedRecraft V4 Pro generates high-resolution, art-directed images at 2048px+ with strong composition, text rendering, and design taste. Built for print and production work.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
Usage
const response = await env.AI.run( 'recraft/recraftv4-pro', { prompt: 'A detailed vintage botanical illustration of a rose with leaves and thorns, scientific illustration style', }, { gateway: { id: 'default' }, })console.log(response)
Examples
Large Format Art — Large canvas digital art
const response = await env.AI.run( 'recraft/recraftv4-pro', { prompt: 'A sweeping fantasy landscape with floating islands, waterfalls cascading into clouds, and ancient stone bridges connecting the islands', size: '2048x2048', style: 'digital_illustration', }, { gateway: { id: 'default' }, })console.log(response)
Brand Asset — Professional brand asset with controlled colors
const response = await env.AI.run( 'recraft/recraftv4-pro', { prompt: 'A modern, clean illustration of a shield with a checkmark inside, representing security and trust', size: '2048x2048', controls: { colors: [ { rgb: [46, 117, 182], }, { rgb: [255, 255, 255], }, ], background_color: { rgb: [15, 23, 42], }, }, }, { gateway: { id: 'default' }, })console.log(response)
Editorial Illustration — Magazine-quality editorial illustration
const response = await env.AI.run( 'recraft/recraftv4-pro', { prompt: 'A conceptual illustration of artificial intelligence as a tree with circuit-board branches and glowing data leaves', style: 'digital_illustration', substyle: 'hand_drawn', }, { gateway: { id: 'default' }, })console.log(response)
Parameters
stringrequiredstringstringstringobjectstringformat: uricontentMediaType: image/svg+xmlAPI Schemas
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string" }, "size": { "type": "string" }, "style": { "type": "string" }, "substyle": { "type": "string" }, "controls": { "type": "object", "properties": { "colors": { "maxItems": 5, "type": "array", "items": { "type": "object", "properties": { "rgb": { "minItems": 3, "maxItems": 3, "type": "array", "items": { "type": "integer", "minimum": 0, "maximum": 255 } } }, "required": [ "rgb" ], "additionalProperties": false } }, "background_color": { "type": "object", "properties": { "rgb": { "minItems": 3, "maxItems": 3, "type": "array", "items": { "type": "integer", "minimum": 0, "maximum": 255 } } }, "required": [ "rgb" ], "additionalProperties": false } }, "additionalProperties": false } }, "required": [ "prompt" ], "additionalProperties": false}{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri", "contentMediaType": "image/svg+xml" } }, "required": [ "image" ], "additionalProperties": false}