Codex Can Generate Images Now
Codex already edits your code. With the DreamUtopia REST API, the same session can create a hero image, restyle a product shot, or turn a still into an eight-second video. Paste one skill file, ask in plain English, and the agent handles the upload, the request and the polling.
Codex Image Generation, Without Leaving the Terminal
Codex image generation becomes a normal part of a coding session when the agent can call a media API directly. Coding agents are good at running commands, reading responses and retrying intelligently, which is exactly what a media API needs. Instead of leaving the terminal to open a web app, you can ask Codex for a 16:9 header image and get a result URL back in the same conversation. We built the DreamUtopia API as plain REST for this reason. There is no MCP server to configure and no plugin to install. The skill file teaches the agent the base URL, the authentication header, the multipart upload, the two create endpoints, the polling loop and the error rules. One pasted skill and one environment variable are the whole setup. The same key also works from your own scripts, which means the agent and your build pipeline share one integration and one credit balance. That matters when a design task starts in a chat and ends in a deploy script: the request shape does not change between the two. The workflow also fits the way coding agents already work: a request is a normal shell command, a failure is a normal HTTP status, and a long job is a normal id to poll. That means Codex can explain a failure in the same voice it uses for a failing test, and it can keep the generated asset next to the code that references it. For a design-heavy repository, the difference is practical rather than cosmetic: the person writing the component is also the person who can produce the image it needs, without switching tools or losing the context of the change. Codex can run the request, read the JSON response and explain a failure without leaving the task you gave it. That feedback loop is the whole point: the agent already knows how to run a command and interpret the result, so media generation becomes another tool it can use.
What You Get
One copy-paste skill
Paste the skill block below into the Codex chat. The agent follows the recipe for the rest of the conversation without extra prompting. The text is short enough to read in one sitting and specific enough that the agent does not improvise field names. It states the exact values each field accepts, so a malformed request is corrected before it reaches the API. Nothing is written to your repository and nothing is installed.
Local files handled
The agent uploads a photo from your project with a multipart request, then passes the returned id into the generation. The limit is 30 MB for JPEG, PNG and WebP. A file that lives in the repository never needs a public URL first.
Images and video, one key
Text-to-image, image-to-image, text-to-video, image-to-video and first/last-frame transitions all use the same key and the same credit balance. You do not manage separate accounts for stills and motion, and the skill can chain one finished image into the next video request.
Jobs that outlive the chat
Every generation runs on our servers. If the session ends, the agent can list recent jobs by id and collect the result later. The signed result link stays valid for seven days, which is enough time to download it or copy it into a build artifact.
Plain-English requests
Ask for a square product shot or a vertical social clip. The skill maps your words to model, resolution, duration and aspect ratio, then checks the live price matrix before it spends. You can still name exact settings when a task needs them. The agent reports the chosen settings back to you, which makes an unexpected result easier to diagnose.
One price list
The API and the web app charge the same credits. GET /v1/models returns the live resolution, duration and credit matrix, so the agent can compare a five-second clip with a ten-second one before it creates anything.
Explore related tools
Choose the tool that matches your next step.
Give Codex a Media Tool
Create a key, paste the skill, and ask for your first image. The API docs cover every field, status and error code.


