Generate SVG with GPT Image 2.6 and verify it is editable
Request SVG output, decode the file, inspect vector elements and test a small edit. Includes endpoint limits, cost caveats and downloadable checks.
GPT Image 2.6 can return SVG from the Images API generation endpoint using output_format: "svg". The useful question is what you can do with the returned document: open it, inspect its shapes, recolor an element and deliver a usable asset. A .svg filename alone does not establish any of those things.
This guide was checked against OpenAI’s documentation on November 5, 2026. It provides a complete documentation-based request and locally tested inspection tools. We did not make a paid Image 2.6 generation request in this batch, and the example prompt below is not represented as a successful model output. Neither the complete Ofox public catalog nor our account’s model list included 2.6 during our check, so the request uses the direct OpenAI API.
Choose an asset whose editability you can verify
Start with a simple icon or flat illustration. Our proposed test is an orange bird on a dark branch, using separate solid-color shapes. It gives you clear acceptance questions: can you select or identify the wing, change its fill, preserve the other elements and render the file again?
Create a simple flat vector illustration of an orange bird perched on a
dark branch. Use solid fills, distinct closed shapes, no gradients,
no textures, no text and no photographic elements. Keep the bird body,
wing, eye and branch visually separate so their colors can be edited.
Leave generous empty space around the subject.
This is an original request template. It asks for a convenient structure but does not guarantee named layers or separate selectable parts. A vector document can still consist of an inconvenient compound path or many small paths. Inspect the actual output before calling it production-ready.
For a logo, additionally check originality, small-size legibility and authorized use of source assets. A generated SVG is not trademark clearance. If a design includes text, distinguish editable text objects from letters outlined as paths. Outlined lettering can be vector geometry without being editable as a normal text field.
Know what this API route supports
| Setting or property | Current documented behavior |
|---|---|
| Endpoint | POST /v1/images/generations |
| Models | gpt-image-2.6-flare or gpt-image-2.6-sunburst |
| Output | output_format: "svg" |
| Number of results | Set n to 1 |
| Unsupported options | Streaming, partial images, output_compression, prompt_rewriter |
| Image-edit endpoint | Does not output SVG; SVG is not supported as its raster input |
| Returned content | Static vector content; no scripts, external resources or embedded raster images under the documented contract |
The process first creates a reference image and then produces SVG. quality controls that reference image. This is not a guarantee of a particular path count, clean layer naming or matching every existing design-tool convention. The prompting guide is a useful reference for keeping a request focused.
Generate once, with an explicit budget
You need a direct OpenAI API project, credentials and billing access, plus curl and Python 3. ChatGPT product access and API access are separate checks. The pricing guide explains why SVG has a reference-image charge and an authoring-model charge; do not assume the image-output token rate alone is the total.
Download the companion ZIP. It includes svg-request.json with the prompt above, gpt-image-2.6-flare, quality: "low", complexity: "low", size: "auto", n: 1 and output_format: "svg". These settings are a starting example, not a measured recommendation. Keep the OpenAI key in OPENAI_API_KEY, not in the request file.
curl --fail-with-body --max-time 240 \
https://api.openai.com/v1/images/generations \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @svg-request.json \
--output svg-response.json
If the command fails, inspect the error before retrying. In particular, a local timeout is not proof that no generation or charge occurred. A model-not-found response requires checking the exact model and account access, not adding guessed parameters.
After a successful response:
python3 decode_image.py svg-response.json bird.svg
python3 inspect_svg.py bird.svg
The decoder reads data[0].b64_json, validates the base64 data and checks that the XML root is SVG. It refuses to overwrite existing files. It does not generate vector content from a PNG by renaming it. Preserve the original response privately if it contains information you should not publish; share only redacted evidence and authorized assets.
Inspect structure before opening or embedding
The companion inspector prints the viewBox, dimensions, element counts and review flags. It rejects XML declarations used for entities and flags script, image, foreign content, style blocks and resource-reference attributes for review. It is a conservative structural screen, not a complete security sanitizer. A flagged file needs investigation; a clean result is not a blanket guarantee that arbitrary SVG is safe to serve inline.
For the simple bird request, useful observations include:
- A valid SVG root and sensible coordinate system, so the drawing has a predictable viewport.
- Paths or geometric elements that describe the drawing, rather than a bitmap wrapped in an SVG container.
- Shapes that remain legible when enlarged and at the intended small display size.
- No missing artwork, unexpected external resources or clipped edges.
OpenAI’s documented output excludes embedded raster images. If an <image> element appears in a result attributed to this route, investigate the response and any post-processing instead of silently calling it a clean vector. The same principle applies if an intermediary converts the result before you download it.
For comparison, OpenAI publishes a Flare SVG example and a Sunburst SVG example. They are official examples, not files generated by Ofox or proof that the bird prompt succeeds.
Test a real edit, then render again
Import a copy into your SVG-capable vector editor. Keep the original untouched. Select the wing if the structure allows it, change its fill color and export a second SVG. If selection grabs the whole bird, inspect grouping or compound paths; “vector” does not promise a convenient layer for every object.
For a code-level check on an ordinary simple SVG, identify the exact element and change only its fill on a copy. Do not perform an unrestricted replace of every matching color unless changing every use of that color is the task. Styles, groups and gradients can make a global replacement affect more than you intended.
Render the original and edited copies at the same size and compare them side by side. The intended change should be visible, while geometry and unrelated colors should remain stable. Then inspect the export in the destination application or website. Opening correctly in one editor does not prove identical import behavior everywhere.
Record whether lettering remains text, which elements you could edit and whether the export preserved those edits. If the result is one compound shape, describe that limitation rather than calling it “fully layered.” If you need a PNG derivative, export it separately and retain the SVG master; the raster export is no longer the editable vector deliverable.
Diagnose common handoff problems
| Problem | What to inspect | Practical next step |
|---|---|---|
| SVG output is rejected | Endpoint, model, n and unsupported parameters | Return to the minimal generation request |
| File will not open | Error JSON mistaken for an image, invalid base64 or XML | Inspect the response and decode again; do not change extensions blindly |
| Blank or clipped artwork | Viewport, dimensions, fills and destination renderer | Compare the original in an isolated viewer and the imported copy |
| Lettering cannot be edited as text | Whether it is <text> or path outlines | Keep the outlined version or rebuild typography in the editor |
| Too many tiny paths | Detail level and prompt complexity | Try a simpler solid-fill design, then reassess the new output |
| One part cannot be selected | Groups, compound paths and flattening during import | Inspect structure; do not promise a one-click fix |
| Total cost exceeds an image estimate | Authoring-model component and all generated attempts | Reconcile actual usage with the bill |
These are inspection steps, not a list of reproduced 2.6 defects. They also explain why a downloadable SVG and a screenshot of it answer different questions: the screenshot shows appearance, while the source document lets the reader inspect structure.
Deliver the source, not just a preview
An accepted handoff should include the original SVG, the edited version, a raster preview, the prompt and settings without secrets, and a note describing the edit actually verified. Keep model usage and charges in your private test record. A concept cover or a synthetic fixture is not evidence that the model produced a specific asset.
For animated output, use the separate GIF workflow. For changing letters inside an existing raster design, image-text translation and layout preservation is a different workflow; generating a new SVG does not guarantee a faithful conversion of that existing artwork.
Before using an Ofox route, check its current model documentation and integration guides. Do not substitute an Ofox base URL into these examples until the exact model and output format have been confirmed there.


