POST
/api/v1/generate-svg$0.25/callGenerate SVG from Text
Generate a vector SVG from a text prompt. Describe what you want and AI creates it.
Request
curl -X POST https://vectosolve.com/api/v1/generate-svg \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"prompt": "a minimalist mountain landscape at sunset", "style": "vector_illustration"}'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | required | Text description of the SVG to generate. Be specific for best results. Min 3, max 1000 characters. |
| style | string | optional | Visual style, one of: "vector_illustration", "vector_illustration/line_art", "vector_illustration/engraving", "vector_illustration/linocut", "vector_illustration/bold_stroke", "vector_illustration/colored_stencil", "vector_illustration/thin", "vector_illustration/mosaic". Unrecognized values fall back to "vector_illustration". Default: "vector_illustration". |
| size | string | optional | Output size: "1024x1024", "1024x1536", or "1536x1024". Unrecognized values fall back to the default. Default: "1024x1024". |
| colors | array | optional | Up to 5 preferred colors, as hex strings ("#0090ff") or RGB objects ({"r":0,"g":144,"b":255}). Invalid entries are ignored. |
Send parameters as a JSON body with Content-Type: application/json.
Response
200 OK
{"success": true,"data": {"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>...</svg>","svg_url": "https://...","format": "svg","processing_time_ms": 4100},"credits": {"used": 0.25,"remaining": 9.75}}
Authentication Required
Include Authorization: Bearer vs_xxx in all requests. Rate limit: 60 requests/minute.