Unified Codex + Claude tutorial · edit

How to restore an old photo with Medux MCP

Learn to restore an old photo with the Medux API through Codex or Claude MCP. Check inputs, tool calls, task status, and output.

Watch the complete workflow: restore an old photo with Codex, Claude, MCP, and Medux. Watch on YouTube ↗
Choose your AI client

Follow the Codex or Claude workflow

The Medux operation and request fields are shared. Switch tabs for the client-specific prompt, approval pattern, screenshots, and walkthrough.

Codex-specific workflow

Run Restore Old Photos with AI as a Codex MCP task

Use the active workspace as the source of truth. Ask Codex to identify the source photograph and any restoration constraints, select the Medux photo restoration tool, and keep the Medux task ID and returned output with the rest of the project. Naming the input roles and the expected result prevents an agent from guessing which file should be used where.

Codex prompt pattern

In this workspace, use the Medux photo restoration tool through Medux MCP to restore old photos.
First inspect and identify the source photograph and any restoration constraints.
Show me the exact tool arguments before execution.
After the task completes, return the restored image and verify that damage is reduced while the original subject, composition, and important details remain recognizable.

Approval gate

Before approving the call, compare the selected tool, file or asset IDs, ordering, timing, and output settings with the request. If a local filename was mapped to an uploaded Medux file ID, keep that mapping visible so it can be audited later.

Result verification

Let Codex monitor an asynchronous task until it reaches a terminal state, then save or report the restored image. The final check is explicit: confirm that damage is reduced while the original subject, composition, and important details remain recognizable.

Before you start

The video uses a simple input file named repair.jpeg. Codex already has access to the project workspace and can reach the Medux MCP tools from the same chat.

InputOne old portrait photo, saved in the workspace as repair.jpeg.
OutputA restored file named repair_restored.png, downloaded back into the same workspace.
User prompt:
Using medux to restore Old Photo (repair.jpeg).

Workflow steps

Find source photo
Select Medux tool
Upload image
Run repair task
Save result
01

Ask Codex to restore the old photo

Start with a direct instruction. Codex reads the request, locates repair.jpeg, and checks which Medux capabilities are available in the MCP session.

Codex locating repair.jpeg and checking Medux capabilities
Codex begins by finding the source image and preparing the Medux restoration route.
02

Create an upload URL and send the source image

Codex uses the Medux upload primitive to create a signed upload URL, then pushes the local JPEG to Medux. This keeps the media transfer inside the agent workflow instead of requiring a separate dashboard.

# Behind the scenes, Codex handles a flow like this:
medux.create_upload_url --filename repair.jpeg --content-type image/jpeg
curl -X PUT "$MEDUX_UPLOAD_URL"   -H "Content-Type: image/jpeg"   --data-binary "@repair.jpeg"
Codex creates a Medux upload URL and uploads repair.jpeg
The upload step prepares the image so Medux can process it as a task asset.
03

Submit the Medux photo-repair job

After the file is uploaded, Codex submits the repair request to the Medux photo-repair tool. The job is then queued and moved into processing.

# Conceptual MCP flow:
medux.photo_repair --input "$MEDUX_FILE_URL"
medux.task_query --task-id "$TASK_ID"
04

Poll the task until the restored image is ready

Codex keeps checking the task status, so the workflow stays hands-free. When Medux moves the job to PROCESSING, Codex waits briefly and asks for the result again.

Codex polling the Medux photo repair task
Task polling is useful for longer AI media jobs because Codex can keep the process moving without manual refreshes.
05

Download the restored PNG to the workspace

When the Medux job finishes, Codex downloads the generated result instead of leaving it as a remote CDN link only. In the video, the final file is saved as repair_restored.png.

Codex downloads the completed Medux restoration result
Codex reports that the Medux job finished successfully and brings the restored PNG back into the local project.

Result preview

The sample run repairs the portrait and produces a cleaner, colorized, higher-resolution PNG while preserving the original composition.

Before · repair.jpeg
Original black and white old photo before restoration
After · repair_restored.png
Colorized and restored old portrait after Medux processing
The video notes that this Medux photo-repair run does more than scratch cleanup: it also colorizes and restyles the portrait. For a conservative black-and-white restoration, run a second pass with that preference stated clearly in the prompt.

Why this workflow is useful

Medux provides the media-processing layer, while Codex handles the operational details: finding files, choosing the right MCP tool, uploading assets, tracking task status, and saving the final output. That makes old-photo restoration easy to repeat and easy to plug into a larger content pipeline.

No manual dashboard switching
No custom upload script
Final asset saved locally

Example result

src / rst demonstration

Below is the complete restoration example: src is the original old photo, and rst is the restored result generated by Medux.

src
Original old photo before restoration
Source image. Original old photo used as the restoration input.
rst
Restored photo result generated by Medux
Generated result. Final restored photo generated by Medux.

Claude-specific workflow

Run Restore Old Photos with AI as a Claude MCP workflow

Keep the goal, source assets, and constraints together in the conversation. Ask Claude to restate the source photograph and any restoration constraints before proposing the Medux photo restoration tool. That context checkpoint makes the file roles and desired outcome easy to correct before any Medux call is approved.

Claude prompt pattern

Using the assets and requirements in this conversation, help me restore old photos with Medux MCP.
Restate which input fulfills each role: the source photograph and any restoration constraints.
Propose the the Medux photo restoration tool call and summarize its arguments before asking for approval.
When it finishes, return the restored image with a checklist confirming that damage is reduced while the original subject, composition, and important details remain recognizable.

Context checkpoint

Have Claude summarize the intended transformation, identify every source asset by role, and list the important constraints. Review that summary together with the proposed tool arguments; correct the conversation first if a file, order, time range, or setting is ambiguous.

Result verification

Keep the Medux task ID in the conversation while Claude checks progress. When processing ends, ask for the restored image plus a concise validation checklist confirming that damage is reduced while the original subject, composition, and important details remain recognizable.

Workflow overview

Claude acts as the operator while Medux handles the media processing. You provide the photo and a clear request. Claude selects the available Medux tools, creates an upload target, sends the image, starts the restoration task, checks progress, and retrieves the final file.

Choose photo
Upload asset
Start task
Check status
Save result

Step-by-step

01

Prepare the source image

Place the old photo in the working folder that Claude can access. A clear scan or photo produces the best input for restoration.

Claude prompt for restoring an old photo
The workflow begins with the source image available in the project.
02

Send one clear instruction

Ask Claude to restore the image with Medux and explicitly allow a command-line upload. The concise prompt used in the video follows this pattern:

Restore Old Photo [your-photo.jpg].
Upload the file using a curl command.

The code block wraps automatically on narrow screens and never forces horizontal page scrolling.

Claude interpreting the restoration request
Claude identifies the file and prepares the Medux restoration workflow.
03

Create an upload target and send the photo

Claude calls the Medux MCP file tool to create a temporary upload URL, then uploads the local image with curl. A typical wrapped command looks like this:

curl --request PUT   --header "Content-Type: image/jpeg"   --upload-file "./your-photo.jpg"   "SIGNED_UPLOAD_URL_RETURNED_BY_MEDUX"
Security note: never publish a live signed upload URL, API key, or token in a public tutorial.
Claude uploading the old photo to Medux
The image is uploaded before the restoration task is submitted.
04

Run the old-photo restoration task

After the upload succeeds, Claude calls the matching Medux image-restoration tool and passes the uploaded asset as the input. Approve the tool call when Claude asks for permission.

  • Keep the request focused on restoration rather than redesign.
  • Preserve the people, pose, composition, and original identity.
  • Let Medux repair fading, scratches, blur, and missing detail.
Approval for the Medux restoration tool call
Claude requests approval before starting the Medux processing task.
05

Wait for completion and retrieve the output

Claude checks the Medux task status until the job is complete. When the output URL is returned, download the restored image to the local workspace:

curl --location   "RESULT_URL_RETURNED_BY_MEDUX"   --output "restored-photo.jpg"
Terminal output while downloading the restored image
The completed image is downloaded and saved as a local file.

Review the restored photo

Open the original and restored files side by side. Check facial identity, clothing, background structure, and fine details. In the tutorial result, Medux recovers clearer faces, stronger contrast, cleaner texture, and natural color while preserving the original composition.

Faces remain recognizable
Damage and blur are reduced
Composition stays consistent
Before and after old photo restoration
Final comparison: the original source and the restored Medux output.

Why this workflow is useful

There is no need to open a separate media dashboard or write a custom integration. Claude manages the sequence through MCP, while Medux provides the upload, task, and media-processing infrastructure behind the scenes.

Natural-language controlDescribe the result instead of manually wiring each API request.
Reusable automationUse the same pattern for batches, agents, and larger media workflows.

Quick answer

How do I restore an old photo with Medux MCP?

Connect either Codex or Claude to Medux MCP, prepare the required inputs, review the proposed medux_photo_repair call, and verify the returned result. The tabs above keep client-specific prompting on one canonical page.

Can I use the same Medux tool in Codex and Claude?

Yes. The client interaction differs, but both use the same Medux MCP tool and API request contract shown in this tutorial.

Related developer intent

Use AI agents to restore an old photo

This tutorial addresses developer workflows for AI old photo restoration and restore damaged photos with AI by making the task repeatable through the Medux API. Codex or Claude can prepare inputs, show the MCP tool arguments for approval, monitor processing, and return an output that can be checked against the original request.

This capability can feed an image-to-video AI pipeline by preparing the source image, preserving the intended subject, and passing an approved asset into a photo-to-video or AI image-animation workflow.

Can Codex or Claude restore an old photo through Medux MCP?

Yes. Use the client-specific tab above to prepare the inputs, review the Medux tool call, run the operation, and verify the returned result. The linked API reference remains the source of truth for supported fields and limits.

Production, trust, and developer intent

Apply rights-aware controls when you restore an old photo

Use this as an authorized AI media processing workflow for restore an old photo. Codex or Claude can expose the selected files, tool arguments, task status, and result checks, making the edit easier to review than an opaque one-click video operation.

Only process media you own or are permitted to modify. For production and commercial publishing, retain the source license or authorization, review the changed region, and record who approved the final output.

What should I verify before running an AI video editing API?

Verify ownership or permission, choose the operation that matches the requested edit, inspect the complete output, and keep the task record with the approved source file.