Skip to content

Codex

Image CDN for Codex

Codex reads TOML, not JSON — four lines in ~/.codex/config.toml and your images are handled.

$0 forever 20 GB bandwidth 3 GB storage hard stop at quota — never a surprise bill. Compare plans

Add AuraImage to Codex

This file is TOML. An mcpServers JSON block pasted here will not load, and Codex will not tell you why. env_vars lists variable names only — Codex inherits the value from the shell that launched it, which matters because this config is global to every project on the machine.

~/.codex/config.toml
[mcp_servers.auraimage]
command = "npx"
args = ["-y", "@auraimage/mcp-server@latest"]
env_vars = ["AURA_SECRET_KEY"]

Or from the terminal

bash
codex mcp add auraimage -- npx -y @auraimage/mcp-server@latest

Verified against the vendor docs on 2026-08-09.

Optimize images with Codex

Each prompt is paired with the MCP tool it fires.

  • I am in a different repo today — audit its images for LCP the same way.audit_lcp
  • Port the S3 image bucket this repo uses over to AuraImage — the credentials are exported in this shell, so keep them out of ~/.codex/config.toml.migrate_assets
  • Write alt text for every image under docs/ and apply it in place.generate_alt
  • Emit a responsive <img> with srcset for the docs hero and print it to stdout.generate_responsive_tag
  • Crop avatar.png to a square and show me the result before it overwrites the original on disk.smart_crop_preview
codex — ~/dev/acme-storefront
OpenAI Codex(v0.132.0)
model:gpt-5.6-sol low/modelto changedirectory:~/dev/acme-storefront
/install-auraimage-app
I'll scan the project first — framework, image surface, secrets, backend, hosting — then show you one plan and one confirm.
Read package.json→ Next.js 15.4 · App Router · TypeScript · pnpm 9
Grep <img|background-image→ 14 <img> tags · 6 res.cloudinary.com URLs
Glob public/**/*.{png,jpg}→ 23 local images · 18.7 MB total
Read .gitignore→ .env.local ignored · no AURA_* keys anywhere
Read vercel.json→ hosting: Vercel → env file convention .env.local
Discovery — acme-storefront
  Framework   Next.js 15 (App Router, TypeScript, pnpm)
  Images      14 <img> tags · 23 files in /public · 6 Cloudinary URLs
  Secrets     no AURA_* keys · .env.local gitignored
  Backend     route handlers — can sign upload tokens
  Hosting     Vercel

Plan
  1. Credentials & env     →  auraimage-api-key
  2. Register MCP server   →  .mcp.json
  3. Install SDK           →  pnpm add @auraimage/sdk
  4. Components            →  <AuraImage /> + <AuraUploader />
  5. Token route           →  app/api/aura/sign/route.ts
5 steps · 6 writes · nothing runs before this confirm. Proceed? (or describe changes, e.g. 'skip uploader')
y
No Secret Key found. Paste one from the dashboard (Settings → Secret Keys) — it stays masked in this session.
sk_live_0198a4f2…9c1b
Fetch auraimage.ai/v1/sign — validate key→ valid · project acme-storefront · key name "prod"
Write 2 keys to .env.local? A secret is never written to disk without this confirm. (.env.local +AURA_SECRET_KEY=sk_live_0198…9c1b +NEXT_PUBLIC_AURA_PROJECT_NAME=acme-storefront)
y
Write .env.local→ +2 keys · values masked in the log
Edit .mcp.json→ merged "auraimage" server · existing servers untouched
Bash pnpm add @auraimage/sdk→ + @auraimage/sdk 1.4.2
Packages: +1
+ @auraimage/sdk 1.4.2
Done in 1.8s
Bash npx shadcn@latest add https://auraimage.ai/registry/image.json→ components/aura/image.tsx
Bash npx shadcn@latest add https://auraimage.ai/registry/uploader.json→ components/aura/uploader.tsx
Created app/api/aura/sign/route.ts — the <AuraUploader /> default endpoint, no extra wiring(+11 −0)
import { AuraImage } from '@auraimage/sdk';

const aura = new AuraImage({
  secretKey: process.env.AURA_SECRET_KEY!,
  projectName: process.env.NEXT_PUBLIC_AURA_PROJECT_NAME!
});

export async function POST() {
  const signature = await aura.signUpload({ maxSize: '5mb', allowedTypes: ['image/*'] });
  return Response.json({ signature });
}
AuraImage installed — 6 writes, 0 failures

Wrote
  .env.local           +2 keys (masked)
  .mcp.json            auraimage MCP server
  package.json         @auraimage/sdk 1.4.2
  components/aura/     image.tsx · uploader.tsx
  app/api/aura/sign/   route.ts (+11 lines)

Next
  1. Restart your agent to load the MCP server
  2. audit_lcp — scan for unoptimized images
  3. migrate_assets — 23 local + 6 Cloudinary images detected
  4. auraimage-react — <AuraImage /> patterns

Docs: https://auraimage.ai/docs
gpt-5.6-sol low · ~/dev/acme-storefront

A Cloudinary alternative your agent can wire up itself

CapabilityCloudinary / ImgixAuraImage with Codex
Pricing modelMetered per GB and per transformFlat monthly price
EgressBilled$0
AVIFOpt-in configurationServed by default
BlurHash placeholdersBuild it yourselfBundled
ComponentSDK importLands in your repo, yours to edit
InstallManual wiringOne MCP config, then a prompt

Teach Codex your image conventions

Codex includes at most one instructions file per directory: AGENTS.override.md if it is there, otherwise AGENTS.md. Drop an override beside a package and Codex uses it in place of that package’s AGENTS.md. It also stops adding files once the combined text reaches project_doc_max_bytes, 32 KiB by default — worth knowing before you paste a long image style guide in.

PathAGENTS.md

Verified against the vendor docs on 2026-08-09.

Questions, answered

The things developers ask before they ship. If something is missing, just email us.

Install it in your side project. Pay when you ship.

$0 forever 20 GB bandwidth 3 GB storage hard stop at quota — never a surprise bill. Compare plans