How to generate vector art with ChatGPT Codex

Published

Codex is OpenAI's coding agent, included with ChatGPT plans, and it can also generate images. VTracer's Gen AI lab can use your Codex to make the artwork, then trace it to SVG on your own computer. Unlike the lab's local models, Codex runs in OpenAI's cloud: there is nothing to download and no GPU needed, but your prompt is sent to OpenAI, and generation uses your ChatGPT plan's limits.

Codex at a glance

Made by OpenAI
Image model gpt-image-2, Codex's built-in image generation
Runs In OpenAI's cloud
Account Your own ChatGPT plan, signed in to Codex
Cost Counts toward your Codex usage limits
Download and memory None: nothing runs locally but the tracing
Image size Around 1,250 × 1,250 pixels in our rounds, sometimes portrait or landscape
Image-to-image Yes: sketches and reference images
What leaves your machine Your prompt, and any sketch or reference image

According to OpenAI's documentation, Codex's built-in image generation uses gpt-image-2 and counts toward your general Codex usage limits; image generations use those limits 3 to 5 times faster on average than turns without images, depending on quality and size. Codex is included in ChatGPT's Free, Go, Plus, Pro, Business, Edu and Enterprise plans; see Codex pricing for which plans include image generation and what happens when limits run out.

Set up Codex in VTracer

You do this once. VTracer does not sign in to OpenAI for you: Codex keeps its own sign-in, and VTracer runs it on your machine.

  1. In the Gen AI tab, click the settings button, the gear beside the menu in the Model section.
  2. In the Models window, open the Vendor tab and follow its instructions: install the Codex CLI, and sign in with your ChatGPT account. If you installed Codex somewhere other than the standard location, put the path to its codex program in the box under OpenAI Codex. Once Codex is found and signed in, a green dot shows beside its name, with your account, the Codex version and your plan; the button on the right checks again.
  3. Open the model menu. OpenAI Codex is now listed under Vendor, marked Signed in. Choose it.
The VTracer app on the Gen AI tab, with the model menu open. The settings button beside the menu is marked 1. In the menu, under Stable Diffusion, FLUX and Z-Image, the Vendor group lists OpenAI Codex, marked Signed in, and marked 3.
Step 1: the settings button beside the model menu. Step 3: OpenAI Codex in the menu, signed in.
The Models window on its Vendor tab, marked 2. It says generation runs at a vendor, through its own tool on your own account, and that your prompt leaves this machine. Below, OpenAI Codex shows a green dot, the Codex version and the plan, with the path to the codex program in a box under it; this card is marked 2.
Step 2: the Vendor tab, with Codex signed in. The box holds the path to Codex, for an installation outside the standard location. The account's email is blurred here.

How to generate vector art with Codex in VTracer

  1. In the Gen AI tab, choose OpenAI Codex from the model menu.
  2. Type a subject and any details, and pick an art style. All eight art styles work with Codex.
  3. Generate. VTracer sends the prompt to Codex, receives the image, and traces it with VTracer 2 on your device, with the background removed.
On the left, a cartoon red fox as generated by Codex, 1254 by 1254 pixels, smiling with its mouth open. On the right, the same fox as a traced SVG of 42 paths.
One round: the image Codex returned, and the SVG VTracer 2 traced from it on your device.

Codex returns larger images than the local models, so VTracer upscales them less before tracing. A round took about 50 seconds in our test, depending on OpenAI's servers rather than your hardware.

The art styles with Codex

Here is a single red fox sitting in each of the eight art styles, generated by Codex and traced:

Eight traced red foxes in two rows, each labelled with its number, style, path count and SVG size: Inked, Flat design, Clip art, Cartoon, Stencil, Low poly, Linocut and Line art.
A red fox sitting, in eight art styles, by Codex. Under each: the paths in the SVG and its size.
  • Faithful to the style. Codex follows style instructions closely: the stencil is a single silhouette in 10 paths, the flat design and clip art foxes take under 30.
  • Detailed when asked. Inked, low poly, linocut and line art come out finely worked, with hundreds of paths. Choose a simpler style for small, editable SVGs.
  • Larger images, more detail. At around 1,250 pixels, Codex's images carry more fine detail than the local models' 512-pixel ones.

Compare these with the same subject from Z-Image Turbo in Art styles.

From a sketch

Codex can also work from your drawing. As with every sketch round, VTracer first cleans up the photo, lifting your pencil lines off the paper into clean ink, and it is that clean drawing that goes to Codex along with your prompt:

A photo of a pencil sketch of three cats on grey paper; the same sketch cleaned into crisp black ink on white; then the Codex result traced to SVG: the three cats colored orange, grey and black-and-white, each in the same pose as in the sketch.
Three cats: the photo, the clean ink VTracer lifts from it, and Codex's result using it as a reference.

Codex keeps the poses, the wink, the striped tail and the patches from the drawing, and colors each cat in its own way. See Text-to-image vs image-to-image for how sketches and reference images differ.

Privacy and rights

  • Sent to OpenAI: your prompt, and the sketch or reference image if you use one. This is the only way of generating in the Gen AI lab in which anything leaves your machine; with the local models, nothing does.
  • Stays on your device: the tracing, your SVGs, and everything else in VTracer.
  • Your images: OpenAI's terms of use govern what you may do with what Codex generates.

Best for

People who already have a ChatGPT plan, computers without a strong GPU, and artwork that benefits from Codex's prompt following and larger images. To keep everything on your device, use one of the local models: see Which AI image model is best for vector art?