# Recraft V4 SVG > Recraft AI's text-to-vector model for generating production-ready SVG vector images with clean geometry, structured layers, and editable paths ## Quick Reference - Model ID: recraft-v4-svg - Creator: Recraft AI - Status: active - Family: recraft-v4 - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Input Modalities: text - Output Modalities: image - Supported Modes: Text to Image ## API Parameters The compiled parameter schema for this model is available via the API: `GET /v1/models/recraft-v4-svg?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Text prompt for image generation ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9") - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1") - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Values: 1K ### Output & Format - `response_format` (string): How to return the image. Default: url. Values: url, b64_json - `output_format` (string): Output image format. Values: png, jpeg, gif, webp, avif - `output_compression` (integer): Compression level for lossy formats (JPEG, WebP, AVIF) - `n` (integer): Number of images to generate. Default: 1 ### Additional Parameters - `background_color` (object): The preferable background color of the generated images.. Only available via fal - `colors` (array): An array of preferable colors. Only available via fal - `enable_safety_checker` (boolean): If set to true, the safety checker will be enabled.. Only available via fal ## Model Identifiers - Primary Slug: recraft-v4-svg ## Tags image-generation, text-to-image, text-to-vector, svg ## Available Providers ### fal.ai - Config Key: fal/recraft-v4-svg - Provider Model ID: fal-ai/recraft/v4/text-to-vector - Pricing: $0.080/image - Source: https://fal.ai/models/fal-ai/recraft/v4/text-to-vector ### Replicate - Config Key: replicate/recraft-v4-svg - Provider Model ID: recraft-ai/recraft-v4-svg - Pricing: $0.080/image - Source: https://replicate.com/recraft-ai/recraft-v4-svg ## Image Gallery 4 images available for this model. Browse all at https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/gallery ### Curated Examples - [A view of a storefront with the store name "Recraft V4 SVG". The composition should be such, that...](https://assets.lumenfall.ai/aLwV3tNe6bFmrsnMiQA0ZHoDV3N8COBHm8PoSutTHXM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ng2ffsjrhqkd4xtwk5cza1i5zaep@jpeg) - [Minimalist vector flat design of a mid-century modern living room, clean geometric shapes, a pale...](https://assets.lumenfall.ai/f8il7pdDtlOmh-X0Kj43HT4Vz08f8SIJlvS4k5k3hzM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/q2qp6yos2txsrj0xdpmf1u5r06ia@jpeg) - [Minimalist flat vector illustration of an organic, flowing botanical garden. Large, overlapping g...](https://assets.lumenfall.ai/Dy1-jxuKZHXjyS0_9Y5BAV4fJ5aXNzO_pyw9GBkfmQg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/veiebk7q49dzqdk1vxh6n7ghcskr@jpeg) - [Minimalist flat vector design of a cozy bookstore window. Large elegant typography on the glass r...](https://assets.lumenfall.ai/28poBsDTymG3cJs2IbopnC8LrRWsoeKBTor6vArJ1aE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ug30mxomw9kzn2cuax2l9trrdsa5@jpeg) ## Example Prompt The following prompt was used to generate an example image in our playground: Minimalist flat vector design of a cozy bookstore window. Large elegant typography on the glass reads "LOST IN CHAPTERS". Inside, a person browses shelves. A small capybara sits quietly on the sidewalk by the door, wearing a tiny scarf. ## Code Examples ### Text to Image (/v1/images/generations) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/generations \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "recraft-v4-svg", "prompt": "", "size": "1024x1024" }' # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.generate({ model: 'recraft-v4-svg', prompt: '', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.generate( model="recraft-v4-svg", prompt="", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## About ## Overview Recraft V4 SVG is a specialized text-to-vector model developed by Recraft AI designed to generate production-ready vector graphics from natural language prompts. Unlike standard diffusion models that produce rasterized pixels (PNG/JPG), this model outputs natively scalable SVG files with defined geometric paths. Its distinguishing feature is the ability to generate clean, professional-grade vector code that maintains high visual fidelity across different zoom levels without pixelation. ## Strengths * **Clean Geometry and Pathing:** Produces simplified, logical vector paths that avoid the "jagged" or overly complex anchor points common in automated tracing tools. * **Structured Layering:** Organizes drawing elements into distinct, logical groups within the SVG file, making the output easier to manage in professional design software like Adobe Illustrator or Figma. * **Anatomical Accuracy:** High performance in maintaining the structural integrity of subjects, particularly in medical, technical, or iconographic styles. * **Variable Detail Control:** Capable of generating a wide range of vector outputs, from minimalist flat icons and logos to highly detailed line art and complex vector illustrations. ## Limitations * **Stylistic Constraints:** While excellent for graphic design and illustration, the model is not intended for photorealistic imagery or complex textures that rely on gradients and raster-heavy effects. * **Prompt Sensitivity for Code Output:** The "cleanliness" of the resulting SVG code can vary; highly complex prompts may result in more nested groups or redundant paths compared to simpler iconographic requests. * **Niche Utility:** The model is highly optimized for vector output; users requiring standard raster images for web backgrounds or social media may find general-purpose diffusion models more flexible. ## Technical Background Recraft V4 SVG belongs to the Recraft V4 architecture family, specifically optimized for the unique constraints of vector mathematics rather than just pixel-based noise reduction. The training approach focuses on the relationship between descriptive text and the underlying syntax of SVG files, ensuring that the model understands not just visual aesthetics, but also the structural requirements of scalable graphics. This architectural focus allows the model to bypass the "tracing" step typically required to turn AI-generated images into vectors. ## Best For Recraft V4 SVG is ideal for UI/UX designers creating custom icon sets, brand identity developers generating logos, and technical illustrators requiring scalable diagrams. It is particularly useful for workflows where the output must be edited in vector-based software following generation. You can experiment with and integrate Recraft V4 SVG into your applications through Lumenfall's unified API and playground. ## Frequently Asked Questions ### How much does Recraft V4 SVG cost? Recraft V4 SVG starts at $0.08 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use Recraft V4 SVG via API? You can use Recraft V4 SVG through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "recraft-v4-svg". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer Recraft V4 SVG? Recraft V4 SVG is available through fal.ai and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider. ## Links - Model Page: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg - About: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/about - Providers, Pricing & Performance: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/providers - API Reference: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/api - Benchmarks: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/benchmarks - Use Cases: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/use-cases - Gallery: https://lumenfall.ai/models/recraft-ai/recraft-v4-svg/gallery - Playground: https://lumenfall.ai/playground?model=recraft-v4-svg - API Documentation: https://docs.lumenfall.ai