Wanting a vector graphic whose text and colors you can edit, and wanting AI to produce a good-looking image, are two different buying paths. The first needs an editable SVG source file; the second usually gets you a raster image. Mix the two in one purchase, and the most likely outcome is a bill that doesn’t look expensive — followed by a full redraw at delivery.
This isn’t a head-to-head review of which model is stronger. This article tackles one specific question: when the requirement says “editable SVG,” which routes actually work, how each one is priced, and how to inspect the file once you have it.
Core value: By the end, you’ll be able to tell where the vector route ends and the image-output route begins, understand the billing structures of a text model writing SVG source versus a vector API, and use a three-minute routine to judge whether the file in your hand can actually be edited.

What Exactly Is an Editable SVG: Three Acceptance Checks
An editable SVG means the file itself is the graphic markup — the paths and the text are written into the source code, so change one attribute value and the image the browser renders changes with it. It’s not a PNG stuffed inside an SVG wrapper; that kind of file has just a single image reference in its root node, and changing the words or the colors still means going back to the bitmap and redrawing it.
To judge whether a file with a .svg extension is actually editable, you don’t need to install design software — three quick checks are enough:
- Open it in any text editor and you can see the
svgroot node, along with graphic nodes likepath,circle, andtext. - Find a
fillcolor value, change it, and the color really does change after you refresh the browser. - Find the words inside a
textelement, change them, and that line on screen changes along with it — instead of a chunk of pixels getting clipped out.
Pass all three and only then have you got an editable source file; if you pass only the first and the second fails, the graphics have been converted to paths or embedded as an image.
| What you see when you open the file | What it means | Verdict |
|---|---|---|
An svg root node, with path, circle, text and similar nodes inside |
The graphics are described by source code | Editable — both paths and text can be changed |
An svg root node, but only a single image inside pointing to base64 |
A bitmap wrapped in a shell | Not editable — changing text or color means going back to the original image and redrawing it |
The extension is .svg, but opening it shows garbled text or a big binary blob |
The extension has been changed | Not an SVG — treat it as an image |

There Are Two Paths for AI-Generated Editable SVG
One path is to have a text model write out the SVG source. What you get back is a block of markup text; save it as .svg and you can open it. The other path is to call a dedicated vector API that returns the SVG file directly. Both paths produce the same artifact, but their pricing works completely differently: one charges by token, the other by image.
A third path just appeared on 2026-12-01: Baidu’s open-source Unlimited-SVG, which uses roughly 0.5B activated parameters to redraw an image into a structured SVG. This is very new. I’ll mention it only as a research development and leave it off today’s shortlist.

Route One: Text Models Write Editable SVG Source Code Directly
The core idea behind this route is swapping “drawing” for “writing markup.” You describe the graphic’s structure in a prompt, the model returns a block of text that opens with svg and closes with svg, and you write it to a file to get a vector image. Since the deliverable is text, billing naturally falls on tokens.
Available models suited to writing SVG source code, and their unit prices
Among the models available through APIYI (apiyi.com), several are primarily text-output models that are a good fit for this generation task. The prices below come from the official documentation pages, in USD per million tokens, ordered as input / cache read / output.
| Model ID | Input | Cache Read | Output | Output modality | Doc page |
|---|---|---|---|---|---|
qwen3.8-flash |
0.114 | 0.01425 | 0.3876 | Text | docs.apiyi.com/models/qwen3-8-flash.md |
glm-5.3 |
1.4 | 0.259 | 4.396 | Text in, text out | docs.apiyi.com/models/glm-5-3.md |
gemini-4-hydrogen |
1.5 | 0.075 | 7.5 | Text | Overview table only: docs.apiyi.com/models.md |
Across these three models, input prices differ by more than tenfold — and so do output prices. That gap gets amplified when you’re writing SVG, because the source code lands almost entirely on the output side: your prompt is short, and the markup the model writes back is long.
How to call it: base_url, model ID, and prompt constraints
Calls go through the OpenAI-compatible interface, and there are only three things you need to change:
- Base URL: set
base_urltohttps://api.apiyi.com/v1; a single key lets you switch between models. - Model: set
modeltoqwen3.8-flashorglm-5.3, get one working first, then switch. - Messages: put one system message and one user message in
messages. The system message constrains the output format; the user message describes the graphic.
The constraints in the system message are what make or break this. Write out four rules explicitly: return only the XML fragment, with no explanatory prose; the root node must include viewBox; use text nodes for text instead of converting it to paths; and no embedded base64 images or external font references. Miss these and the model will happily wrap the SVG in a line of “Sure, here’s the image you asked for,” and the file won’t even open.
🚀 Quick start: Sign up at APIYI apiyi.com to get free trial credits. Use them to run the simplest possible icon request first — confirm the response is pure XML — then wire it into your own business logic.
Cost per image: the formula is knowable, the unit price isn’t
The cost structure for this route is clear:
Cost per call = input tokens × input unit price + output tokens × output unit price
The cache-read price only applies on a cache hit, and the first request usually won’t hit, so budgeting at the input price is the safer bet. What you genuinely can’t predict in advance is the token count itself — a flat icon might take only a few dozen lines of markup, while a complex illustration with gradients and dozens of paths will multiply the output length several times over. So any “average cost per SVG” figure doesn’t hold up: beyond the official list prices, everything depends on how complex a drawing you ask the model to produce.
The only thing you can pin down is the relative relationship: for the same output, the output price of qwen3.8-flash and glm-5.3 differs by more than tenfold, so any difference in volume gets amplified once more by the price gap. To control cost, control output length first — breaking the graphic into simple elements pays off faster than switching models.
Route Two: A vector API that delivers an editable SVG per image
The second path skips text entirely — the API hands back an SVG file. Recraft’s V4.1, the version that became the default model in May 2026, offers a dedicated vector variant billed per image.
| Variant | Billing | Official list price | Return format | Available on APIYI |
|---|---|---|---|---|
recraftv4_1_vector |
Per image | $0.08 | SVG | No |
recraftv4_1_pro_vector |
Per image | $0.30 | SVG | No |
One thing needs to be clear: Recraft isn’t a model listed on APIYI. It doesn’t appear in APIYI’s model list, and the prices above are Recraft’s own official pricing. To take this path, you’d have to open a separate Recraft account — which means another set of credentials, another billing setup, and invoices that don’t roll up with your existing API.
Its advantage isn’t the unit price, it’s the predictability of the budget shape: a fixed price per image means that when you’re batching out a set of icons, you can calculate the total upfront without worrying that “the model wrote too much this time.” The downside is limited flexibility — what you can tune is the prompt and the variant, not sampling parameters, and you can’t casually swap in a different model under the same key to compare results.
Route Three: Treat Unlimited-SVG as a reference, not a line item
On 2026-12-01, Baidu publicly released Unlimited-SVG, which uses roughly 0.5B activated parameters to redraw an input image as a structured SVG. The repo lives at github.com/baidu/Unlimited-SVG. What it addresses is the “convert an existing image into an editable vector” direction, which isn’t quite the same thing as the “generate from scratch” approach of the previous two routes.
Don’t put this on your procurement list today. It’s a freshly released research effort and tool, not a product that’s already on the market, and there’s no corresponding model to call on APIYI. There’s exactly one reason it’s worth a note: if it later gets wired into a commercial API, the “reference image to editable SVG” scenario will gain another approach — and right now that scenario still mostly depends on manual tracing.
Per-Image Prices Won’t Buy You Editable SVG
The number people keep dragging in to pad out the comparison is the per-call price of the various image-generation models — and sure, it looks low.
| Model ID | Pricing | Unit Price | Output | Editable Paths & Text? |
|---|---|---|---|---|
gemini-nano-banana-2.1 |
Per call | $0.045 | Image | No |
nano-banana |
Per call | $0.02 | Image | No |
gpt-image-2.6-all |
Per call | $0.025 | Image | No |
flux-2-pro |
Per call | $0.03 | Image | No |
The nano-banana, gpt-image, and flux families all produce images, not editable vectors. Lining up their per-call prices against an SVG pipeline in one table to see “which is cheaper” is comparing two different things — the conclusion tells you nothing. And the real cost of choosing wrong isn’t on the invoice either: you deliver the image, the client says “change the primary color and swap the headline for another line,” and all you can do is redraw. The rework time costs far more than those few cents.
When you need pixel-level output like posters, photos, or scene composites, this column is the right pick. When you need to edit paths, change text, and reuse one source file across multiple sizes, don’t use this column to make the numbers look better.
💡 Recommendation: If your team has both kinds of needs, you can account for image-generation tasks and vector tasks separately — but try to keep the API layer in one place. With APIYI apiyi.com you can access text-based models through a single integration, and on the SVG-source route you only change one
modelfield to swap in a different model and compare.
Choosing Between the Two Editable SVG Paths: Work Backward from the Deliverable
The right order of judgment is to start from the deliverable and work backward — not from price and work forward.
| Deliverable requirement | Recommended path | Pricing form | Notes |
|---|---|---|---|
| Need to edit paths, edit text, reuse across multiple sizes | Text model writing source code, or vector API | Per token / per image | Pick one; don’t try to cover it with image-generation pricing |
| Just need a finished poster or photo | Raster image generation model | Per call | Output is an image; it doesn’t enter the vector workflow |
| Batch production, budget must be locked in advance | Vector API | Per image | Total can be budgeted; separate account |
| Need to compare multiple models side by side within one set of interfaces | Text model via an aggregated API | Per token | Base URL unified as https://api.apiyi.com/v1 |
Reading down this table, the two paths really diverge at just one point: do you want a calculable unit price, or an interchangeable interface? If you need budget certainty, the per-image vector API is more direct. If you want to compare the source-code quality that different models produce under a single Key, the text path is the smoother fit.
I won’t declare which one is always cheaper, because the total price of the text path depends on output length while the vector path depends on the number of images. The two curves cross at some batch volume — and where they cross is determined by your graphic complexity, not by the unit price.

Editable SVG Quick Start: A Copy-Paste Workflow
Going from zero to a file you can actually edit is just a matter of following this sequence. If any step fails, you’ll know exactly where to look.
- Define the graphic inventory. First, list the elements and text you want drawn, as specifically as possible, so the model doesn’t improvise.
- Get an API key at APIYI apiyi.com, set the base URL to
https://api.apiyi.com/v1, and first useqwen3.8-flashto get the pipeline working end to end. - Hard-code four constraints in the system prompt: return XML only, include a
viewBox, usetextnodes for text, and don’t embed base64 or external fonts. - Save the returned content as-is to a
.svgfile. Don’t manually add any prefix or suffix, and don’t pass it through a rich-text editor. - Run the three acceptance checks from earlier, especially the steps for changing the color and changing the text.
- Once it passes, switch to
glm-5.3and run the same prompt. Compare whether the source structure is cleaner, and calculate cost based on your actual output length.
Step 6 is easy to skip, but it determines your long-term costs. The same prompt can produce quite different output lengths on two models, and the output pricing itself can differ by more than tenfold. The gap between the two bills will be bigger than you expect.
FAQ
Q1: What is an editable SVG?
It means the file itself is graphical markup — the paths and text are written into the source, and changing an attribute value changes the image along with it. To verify: open it in a text editor and you should see the `svg` root node along with `path` and `text` nodes; change one color or one line of text, and the change really does show up in the browser.
Q2: What’s the difference between a text model writing SVG and a vector API?
Same deliverable, different route. A text model returns a chunk of SVG source text, billed per token, so the total price fluctuates with output length; a vector API returns an SVG file directly, billed per image at a fixed per-image price. With the former you can swap endpoints and compare models side by side; with the latter your budget is predictable and your account stays separate.
Q3: How much does it cost to generate one SVG?
There’s no fixed answer — only a formula: input tokens × input unit price + output tokens × output unit price. Simple icons produce short output; complex illustrations produce very long output, and the two can differ several-fold. Any claim of “a fixed price per image” needs to state the output length it assumes, otherwise it isn’t comparable.
Q4: Why don’t nano-banana, gpt-image, and flux count as SVG solutions?
Because what they produce is an image. The $0.02 to $0.045 per-call price buys you a raster image; to change the primary color or the title, you have to redraw it. Comparing their per-unit price against the vector route is comparing prices for two different deliverables.
Q5: How do I call qwen3.8-flash and glm-5.3 on APIYI?
Just use the OpenAI-compatible interface: set `base_url` to `https://api.apiyi.com/v1` and put the corresponding model ID in the `model` field. Get your key and quota at APIYI apiyi.com. Both models share the same root address, so switching means changing a single field — handy for head-to-head comparison using the same prompt.
Q6: Is Recraft’s recraftv4_1_vector available on APIYI?
No. APIYI’s model list doesn’t include the recraft series. The $0.08 and $0.30 prices are Recraft’s official list prices and require a separate Recraft account to call. If you write it into your plan, budget it separately from your existing endpoints.
Q7: Can Unlimited-SVG be used directly right now?
It was released on 2026-12-01 and is a very new research and tooling project, aimed at redrawing input images into structured SVG; the repo is at github.com/baidu/Unlimited-SVG. For now it shouldn’t be treated as a shipped commercial API, and there’s no corresponding model on APIYI.
Q8: What are the known limitations of SVGs generated by text models?
Mainly three: first, text may get converted into paths, which breaks text editing — you need to explicitly forbid this in the prompt; second, the markup may come with explanatory prose before or after the SVG, so the saved file won’t open; third, complex graphics easily end up with missing closing tags or scrambled path coordinates, which you need to catch one by one through acceptance checks.
Editable SVG Key Takeaways
- What “editable” means: the file itself is graphic markup — paths and text can be changed. It isn’t an image wrapped inside an SVG shell.
- Three acceptance checks: open it in a text editor and inspect the nodes, change one color, change one line of text — it only passes if all three work.
- Two viable paths: a text model writing the source code, billed per token, or a vector API billed per image — the deliverable is the same.
- No calling one cheaper: total price on the text path depends on output length; on the vector path it depends on the number of images. Where the two cross is decided by graphic complexity.
- Image generation pricing is a separate column: nano-banana, gpt-image, and flux output images — picking the wrong one costs you in rework time.
- The third option is reference only: Unlimited-SVG was released on 2026-12-01; it’s a new tool and doesn’t belong on today’s procurement list.
- Shortest path to get started: set the base URL to
https://api.apiyi.com/v1, get things working withqwen3.8-flashfirst, then hook it into your production workload.
Summary
Once the requirement is written down as “editable SVG,” there are only two paths that actually work today:
- A text model writes the source code: billed per token, cost scales with output length, the endpoint is swappable, and models can be compared side by side.
- A vector API delivers per image: a fixed price per image, budget can be locked in upfront, but the account and billing are separate.
- Raster image generation doesn’t count: what you buy at per-call pricing is an image, and it’s no use when you need to edit paths or text.
Which one you pick comes down to whether you want budget certainty or endpoint flexibility — not to which number looks smaller. Once you’ve settled on a path, run the three acceptance checks on the file you already have; that saves more time than repeatedly swapping models.
If you want to compare the SVG quality different text models produce through a single API, APIYI apiyi.com is the quick way to verify it — the base URL stays https://api.apiyi.com/v1. Start with qwen3.8-flash, then swap in glm-5.3 to compare the source structure.
References
-
APIYI Model List: A summary page of available models and pricing
- Link:
docs.apiyi.com/models.md - Description: Check whether a model is available, its pricing unit, and whether it’s included in the master list
- Link:
-
qwen3.8-flash Documentation: Official documentation for input, cache read, and output unit prices
- Link:
docs.apiyi.com/models/qwen3-8-flash.md - Description: Confirms that the output modality is text, making it suitable for SVG source code generation
- Link:
-
glm-5.3 Documentation: Pricing and capability documentation for a text-in, text-out model
- Link:
docs.apiyi.com/models/glm-5-3.md - Description: Used to compare output unit prices with flash-type models
- Link:
-
Recraft API Docs: Official documentation for V4.1 and vector variants
- Link:
recraft.ai/docs/api-reference/models/recraft-v4-1 - Description: Verify per-image pricing and response formats for
recraftv4_1_vectorand the pro variant
- Link:
-
Unlimited-SVG Repository: Structured SVG redrawing research published on 2026-12-01
- Link:
github.com/baidu/Unlimited-SVG - Description: Learn about progress in the “reference image to editable SVG” direction; currently not regarded as a commercial API
- Link:
Author: APIYI Technical Team
Technical discussion: Feel free to contact us through the APIYI website homepage. For more API and model resources, visit the docs.apiyi.com documentation center.
