{ "model_id": "recraft/recraftv4-vector", "provider_id": "recraft", "name": "Recraft V4 SVG", "description": "Generate production-ready SVG vector graphics from text prompts with clean geometry, structured layers, and editable paths.", "task": "Text-to-Image", "tags": [ "Image Generation", "SVG", "Vector", "Design" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Per image": 0.08 }, "examples": [ { "name": "Simple Icon", "description": "Generate a basic vector icon", "input": { "prompt": "A simple flat icon of a coffee cup with steam rising" }, "output": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/simple-icon.svg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/simple-icon.svg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'recraft/recraftv4-vector',\n { prompt: 'A simple flat icon of a coffee cup with steam rising' },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"recraft/recraftv4-vector\",\n \"input\": {\n \"prompt\": \"A simple flat icon of a coffee cup with steam rising\"\n }\n}'" } ] }, { "name": "App Icon", "description": "Mobile app icon in vector format", "input": { "prompt": "A colorful gradient app icon featuring a chat bubble with a sparkle effect", "size": "1024x1024" }, "output": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/app-icon.svg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/app-icon.svg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'recraft/recraftv4-vector',\n {\n prompt: 'A colorful gradient app icon featuring a chat bubble with a sparkle effect',\n size: '1024x1024',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"recraft/recraftv4-vector\",\n \"input\": {\n \"prompt\": \"A colorful gradient app icon featuring a chat bubble with a sparkle effect\",\n \"size\": \"1024x1024\"\n }\n}'" } ] }, { "name": "Illustration", "description": "Vector illustration for web use", "input": { "prompt": "A flat vector illustration of a person working at a desk with a computer, plants, and a window showing a city view", "size": "1024x1024" }, "output": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/illustration.svg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/illustration.svg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'recraft/recraftv4-vector',\n {\n prompt:\n 'A flat vector illustration of a person working at a desk with a computer, plants, and a window showing a city view',\n size: '1024x1024',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"recraft/recraftv4-vector\",\n \"input\": {\n \"prompt\": \"A flat vector illustration of a person working at a desk with a computer, plants, and a window showing a city view\",\n \"size\": \"1024x1024\"\n }\n}'" } ] }, { "name": "With Brand Colors", "description": "Vector with specific color palette", "input": { "prompt": "A badge or seal design with a star in the center, suitable for a certification mark", "controls": { "background_color": { "rgb": [ 255, 255, 255 ] }, "colors": [ { "rgb": [ 0, 119, 182 ] }, { "rgb": [ 255, 209, 102 ] } ] } }, "output": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/with-brand-colors.svg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/recraft/recraftv4-vector/with-brand-colors.svg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'recraft/recraftv4-vector',\n {\n prompt: 'A badge or seal design with a star in the center, suitable for a certification mark',\n controls: {\n background_color: { rgb: [255, 255, 255] },\n colors: [{ rgb: [0, 119, 182] }, { rgb: [255, 209, 102] }],\n },\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"recraft/recraftv4-vector\",\n \"input\": {\n \"prompt\": \"A badge or seal design with a star in the center, suitable for a certification mark\",\n \"controls\": {\n \"background_color\": {\n \"rgb\": [\n 255,\n 255,\n 255\n ]\n },\n \"colors\": [\n {\n \"rgb\": [\n 0,\n 119,\n 182\n ]\n },\n {\n \"rgb\": [\n 255,\n 209,\n 102\n ]\n }\n ]\n }\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": true, "zdr_comment": null, "external_info": "https://www.recraft.ai/", "terms": "https://www.recraft.ai/terms", "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/recraft/recraftv4-vector.png", "metadata": { "Output Format": "SVG", "Resolution": "1024px" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "recraft", "pricing": { "output_image_count": 0.08 } } ], "banner": null, "created_at": "2026-05-22 17:53:56", "schema": { "input": { "$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 }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string" } }, "required": [ "image" ], "additionalProperties": false } } }