One prompt makes the edit. The Timeline keeps every version.
TRUECAST is an image and video editing service for AI agents. An agent sends a file and a plain English instruction. TRUECAST makes the edit with a real editing engine, saves the new file, and adds it to a version history called the Timeline.
The agent can later undo the edit, return to an older version, or start a new edit from any saved version. TRUECAST never replaces an old file.
These tools are published through the live HTTPS REST and MCP surfaces at
truecasts.xyz. Paid calls use x402 USDT settlement on X Layer;
discovery, health checks, quotes, history, deterministic composition, and smart reframe remain free.
| Tool | Plain-English purpose |
|---|---|
edit | Edit an image. It can add overlays, mask blur/pixelation, color grade, remove a background or object, replace text, crop, resize, recolor, compress, or run several steps in one request. |
edit_video | Edit a video. Deterministic composition adds overlays, captions, transitions, masks, grading and voiceover ducking for long videos; Runway handles short generative removal/background edits. |
find_text | Return the text TRUECAST detected, with a target ID and location for each item. A human UI can show the same results in a dropdown. |
revert | Make an older saved version current again and return its real file. |
branch | Start a new image or video edit from any saved version without deleting later versions. |
history | Return every saved version, its parent, the edit that created it, and its receipt. |
verify_provenance | Check the file's edit receipt, version history, and X Layer proof. |
reroll is a mode of edit and edit_video. It repeats the last edit from the same parent and
creates a new sibling version.
These are the TRUECAST launch prices for the OKX Agent Service Provider. Payment is in USDT on X Layer. The agent sees the exact amount in the x402 payment request before the tool runs.
| Tool call | Agent price |
|---|---|
edit | 0.10 USDT per image call |
deterministic reframe_video | Free, accepts up to 180 seconds within measured VPS limits |
generative edit_video | 0.30 USDT per input second, accepts 2–30 seconds, 0.60 USDT minimum |
find_text | 0.01 USDT per image or video call |
revert | 0.01 USDT per call |
branch to a new image edit | 0.10 USDT per call |
branch to a new video edit | 0.30 USDT per input second, accepts 2–30 seconds, 0.60 USDT minimum |
history | Free |
verify_provenance | 0.02 USDT per call |
Examples:
Rejected requests are not successful edits. A vague video target, a video over 200 MB, or a disabled feature must stop before a paid render. The final OKX payment flow must also avoid settling these as successful calls.
The prices are defined in docs/PRICING.md. The current code has not yet passed the live OKX settlement gate, so these are the launch prices—not a claim that public payments are already active.
Image prompts can combine several steps in one call. For example:
Remove the background, change the sign to SALE, and crop the image to a square.
TRUECAST uses:
rembg for background removal;Consecutive compositor edits stay in memory and are encoded once at the end. PNG preserves
alpha losslessly; JPEG defaults to quality 95 with 4:4:4 chroma and progressive encoding; WebP
defaults to quality 95. ICC and DPI metadata are retained when the input provides them. Logo and
watermark prompts require a named supporting_assets.logo or supporting_assets.watermark image.
Regional blur or pixelation requires region=[left,top,right,bottom]; TRUECAST asks for it before
rendering if it is missing.
Text replacement needs a box around the text. If no box is supplied, TRUECAST asks the agent to identify the text before it spends money.
An agent should not have to guess which text a prompt means. It calls find_text first:
{
"targets": [
{"target_id": "text_a1b2c3", "text": "OPEN", "region": [29, 52, 240, 137]},
{"target_id": "text_d4e5f6", "text": "EXIT", "region": [317, 185, 439, 242]}
]
}
The agent chooses one target_id and sends the new wording. If an image text-edit prompt does
not name a target, edit returns these choices automatically before any FLUX charge. On a web page, these same results
become a dropdown with highlighted boxes on the preview. On video, each result also includes the
times when the text was detected.
The local detector is RapidOCR with PP-OCRv6-small. It returns detected text, not a promise
that it found every visible word. Small, blurred, stylized, moving, or low-contrast text can be
missed. A valid PNG, JPEG, or WebP may be as small as 1×1; a tiny or blank image returns HTTP 200
with targets: []. Images are limited to 20 MiB, 12,000 pixels per side, and 40 megapixels.
Corrupt or mislabeled bytes return HTTP 422 with a stable reason_code and the allowed ranges,
so an agent can correct its input without guessing. Image text replacement works after selection.
Exact video text replacement remains unavailable until a real editing engine for it is verified.
Video prompts must describe the target clearly. Good examples are:
Remove the person wearing the red jacket.
Replace the office background with a quiet beach.
Crop to 9:16 and keep the speaker centered.
Long-video compositor prompts can combine verified deterministic operations:
Add logo at top right then add captions then apply cinematic color grade.
Blur selected ellipse region then duck audio under voiceover.
Crossfade to clip2 then apply LUT.
The supporting assets use fixed names so prompts cannot ambiguously select a file:
logo or watermark: PNG, JPEG, or WebP; pip: an MP4/MOV/M4V/WebM animated picture-in-picture;captions: UTF-8 SRT or ASS. ASS styling and karaoke/word-highlight tags are preserved;clip2: MP4, MOV, M4V, or WebM for fade, wipe, or slide transitions;lut: a valid 3D .cube color lookup table;voiceover: WAV, MP3, M4A, AAC, FLAC, OGG, or a video containing audio.Regional blur and pixelation require region=[left,top,right,bottom], either normalized from
0 to 1 or expressed in frame pixels. Audio ducking uses the separate voiceover track as the
sidechain and lowers the source soundtrack beneath it. TRUECAST does not claim it can reliably
separate speech from music that has already been mixed into one finished track.
The compositor streams through FFmpeg and performs one final H.264 encode at CRF 18 with the
medium preset, compatible yuv420p, AAC 192 kb/s audio, and fast-start metadata. Clip audio
uses a matching crossfade. Source videos and final montages must remain within the measured-safe
180-second, 1080p, 30 FPS envelope; supporting assets may total at most 200 MB. One deterministic
video job runs at a time on the production host.
TRUECAST uses Runway Aleph 2 for visual video changes. A normal frame-shape change uses OpenCV and ffmpeg when it does not need generative fill.
Before a Runway request, TRUECAST checks:
There is no automatic paid retry.
Runway's current limits depend on how the file is sent. TRUECAST uses ephemeral uploads, whose official limit is 200 MB. A normal video URL is limited to 32 MB and a data URI to 16 MB in Runway's input table. TRUECAST's 200 MB product limit therefore matches the upload method actually used.
Every completed edit becomes a new Version. A Version contains the real output file, not only a hash. It also records:
Two Versions with the same parent are branches. Revert changes which Version is current but does not erase newer work.
TRUECAST adds a C2PA edit receipt to supported images and MP4 files. In plain terms, the receipt says what changed, which engine made the change, and which earlier version was used. If protected file data is changed later, validation fails.
C2PA does not prove that a scene is true. It proves whether the protected file and edit receipt still match. Development receipts use a self-signed certificate; a trusted production certificate is still required for public launch.
TRUECAST groups Version hashes into a Merkle batch and writes one batch root to X Layer. This keeps chain cost low. The X Layer proof can still match the media after its embedded metadata is removed because TRUECAST also records a hash of the decoded pixels or frames.
flowchart LR
A[Agent sends media + prompt] --> G[Safety and cost checks]
G --> E[Real image or video engine]
E --> T[Save new Version and real file]
T --> C[Add C2PA edit receipt]
C --> X[Batch proof on X Layer]
T --> H[History, revert, branch]
| Feature | Status |
|---|---|
| Store real Version files; history, revert, and branch | Verified |
| Crop, compress, recolor, resize, and background removal | Verified |
| FLUX object removal, text replacement, chained edits, and image reroll | Verified with real calls |
| Image C2PA validation and X Layer proof | Verified on X Layer mainnet |
| Aleph 2 object removal and guarded video handling | Verified with one real paid render |
| FFmpeg long-video overlays, captions, transitions, masks, grading, LUT and audio ducking | Verified locally with real encoded outputs |
| MP4 C2PA, video revert/branch, and X Layer proof | Verified on X Layer mainnet |
| Motion brush, exact video text replacement, and lip-sync | Unavailable; requests stop without a render |
| Real image/video text detection with selectable IDs and regions | Verified locally |
| Live OKX listing and real USDT settlement | Not yet verified |
| Public Timeline and Docs pages | Not yet deployed |
Exact task IDs, hashes, charges, and X Layer transactions are in the Verification Ledger.
The intended agent flow is:
history, revert, or branch later.Phase 8 is complete only after an outside agent pays for one image edit and one video edit in USDT on X Layer and receives both real outputs. Until then, the listing and payment status remain unverified.
These commands do not call a paid image or video provider:
python verify.py --track edittrail --phase 1
python verify.py --track edittrail --phase 2
python verify.py --track edittrail --phase 7
pytest -q tests/test_edittrail_video.py
Do not casually rerun Phases 3, 4, 5, or 6. Their paid and on-chain evidence already exists, and Phase 4 can anchor pending Versions.
Apache-2.0. See LICENSE. Hosted engines and their outputs are also subject to their providers' terms, described in CREDITS.md.
88 commits
Python
98.5%
One prompt makes the edit. The Timeline keeps every version.
TRUECAST is an image and video editing service for AI agents. An agent sends a file and a plain English instruction. TRUECAST makes the edit with a real editing engine, saves the new file, and adds it to a version history called the Timeline.
The agent can later undo the edit, return to an older version, or start a new edit from any saved version. TRUECAST never replaces an old file.
These tools are published through the live HTTPS REST and MCP surfaces at
truecasts.xyz. Paid calls use x402 USDT settlement on X Layer;
discovery, health checks, quotes, history, deterministic composition, and smart reframe remain free.
| Tool | Plain-English purpose |
|---|---|
edit | Edit an image. It can add overlays, mask blur/pixelation, color grade, remove a background or object, replace text, crop, resize, recolor, compress, or run several steps in one request. |
edit_video | Edit a video. Deterministic composition adds overlays, captions, transitions, masks, grading and voiceover ducking for long videos; Runway handles short generative removal/background edits. |
find_text | Return the text TRUECAST detected, with a target ID and location for each item. A human UI can show the same results in a dropdown. |
revert | Make an older saved version current again and return its real file. |
branch | Start a new image or video edit from any saved version without deleting later versions. |
history | Return every saved version, its parent, the edit that created it, and its receipt. |
verify_provenance | Check the file's edit receipt, version history, and X Layer proof. |
reroll is a mode of edit and edit_video. It repeats the last edit from the same parent and
creates a new sibling version.
These are the TRUECAST launch prices for the OKX Agent Service Provider. Payment is in USDT on X Layer. The agent sees the exact amount in the x402 payment request before the tool runs.
| Tool call | Agent price |
|---|---|
edit | 0.10 USDT per image call |
deterministic reframe_video | Free, accepts up to 180 seconds within measured VPS limits |
generative edit_video | 0.30 USDT per input second, accepts 2–30 seconds, 0.60 USDT minimum |
find_text | 0.01 USDT per image or video call |
revert | 0.01 USDT per call |
branch to a new image edit | 0.10 USDT per call |
branch to a new video edit | 0.30 USDT per input second, accepts 2–30 seconds, 0.60 USDT minimum |
history | Free |
verify_provenance | 0.02 USDT per call |
Examples:
Rejected requests are not successful edits. A vague video target, a video over 200 MB, or a disabled feature must stop before a paid render. The final OKX payment flow must also avoid settling these as successful calls.
The prices are defined in docs/PRICING.md. The current code has not yet passed the live OKX settlement gate, so these are the launch prices—not a claim that public payments are already active.
Image prompts can combine several steps in one call. For example:
Remove the background, change the sign to SALE, and crop the image to a square.
TRUECAST uses:
rembg for background removal;Consecutive compositor edits stay in memory and are encoded once at the end. PNG preserves
alpha losslessly; JPEG defaults to quality 95 with 4:4:4 chroma and progressive encoding; WebP
defaults to quality 95. ICC and DPI metadata are retained when the input provides them. Logo and
watermark prompts require a named supporting_assets.logo or supporting_assets.watermark image.
Regional blur or pixelation requires region=[left,top,right,bottom]; TRUECAST asks for it before
rendering if it is missing.
Text replacement needs a box around the text. If no box is supplied, TRUECAST asks the agent to identify the text before it spends money.
An agent should not have to guess which text a prompt means. It calls find_text first:
{
"targets": [
{"target_id": "text_a1b2c3", "text": "OPEN", "region": [29, 52, 240, 137]},
{"target_id": "text_d4e5f6", "text": "EXIT", "region": [317, 185, 439, 242]}
]
}
The agent chooses one target_id and sends the new wording. If an image text-edit prompt does
not name a target, edit returns these choices automatically before any FLUX charge. On a web page, these same results
become a dropdown with highlighted boxes on the preview. On video, each result also includes the
times when the text was detected.
The local detector is RapidOCR with PP-OCRv6-small. It returns detected text, not a promise
that it found every visible word. Small, blurred, stylized, moving, or low-contrast text can be
missed. A valid PNG, JPEG, or WebP may be as small as 1×1; a tiny or blank image returns HTTP 200
with targets: []. Images are limited to 20 MiB, 12,000 pixels per side, and 40 megapixels.
Corrupt or mislabeled bytes return HTTP 422 with a stable reason_code and the allowed ranges,
so an agent can correct its input without guessing. Image text replacement works after selection.
Exact video text replacement remains unavailable until a real editing engine for it is verified.
Video prompts must describe the target clearly. Good examples are:
Remove the person wearing the red jacket.
Replace the office background with a quiet beach.
Crop to 9:16 and keep the speaker centered.
Long-video compositor prompts can combine verified deterministic operations:
Add logo at top right then add captions then apply cinematic color grade.
Blur selected ellipse region then duck audio under voiceover.
Crossfade to clip2 then apply LUT.
The supporting assets use fixed names so prompts cannot ambiguously select a file:
logo or watermark: PNG, JPEG, or WebP; pip: an MP4/MOV/M4V/WebM animated picture-in-picture;captions: UTF-8 SRT or ASS. ASS styling and karaoke/word-highlight tags are preserved;clip2: MP4, MOV, M4V, or WebM for fade, wipe, or slide transitions;lut: a valid 3D .cube color lookup table;voiceover: WAV, MP3, M4A, AAC, FLAC, OGG, or a video containing audio.Regional blur and pixelation require region=[left,top,right,bottom], either normalized from
0 to 1 or expressed in frame pixels. Audio ducking uses the separate voiceover track as the
sidechain and lowers the source soundtrack beneath it. TRUECAST does not claim it can reliably
separate speech from music that has already been mixed into one finished track.
The compositor streams through FFmpeg and performs one final H.264 encode at CRF 18 with the
medium preset, compatible yuv420p, AAC 192 kb/s audio, and fast-start metadata. Clip audio
uses a matching crossfade. Source videos and final montages must remain within the measured-safe
180-second, 1080p, 30 FPS envelope; supporting assets may total at most 200 MB. One deterministic
video job runs at a time on the production host.
TRUECAST uses Runway Aleph 2 for visual video changes. A normal frame-shape change uses OpenCV and ffmpeg when it does not need generative fill.
Before a Runway request, TRUECAST checks:
There is no automatic paid retry.
Runway's current limits depend on how the file is sent. TRUECAST uses ephemeral uploads, whose official limit is 200 MB. A normal video URL is limited to 32 MB and a data URI to 16 MB in Runway's input table. TRUECAST's 200 MB product limit therefore matches the upload method actually used.
Every completed edit becomes a new Version. A Version contains the real output file, not only a hash. It also records:
Two Versions with the same parent are branches. Revert changes which Version is current but does not erase newer work.
TRUECAST adds a C2PA edit receipt to supported images and MP4 files. In plain terms, the receipt says what changed, which engine made the change, and which earlier version was used. If protected file data is changed later, validation fails.
C2PA does not prove that a scene is true. It proves whether the protected file and edit receipt still match. Development receipts use a self-signed certificate; a trusted production certificate is still required for public launch.
TRUECAST groups Version hashes into a Merkle batch and writes one batch root to X Layer. This keeps chain cost low. The X Layer proof can still match the media after its embedded metadata is removed because TRUECAST also records a hash of the decoded pixels or frames.
flowchart LR
A[Agent sends media + prompt] --> G[Safety and cost checks]
G --> E[Real image or video engine]
E --> T[Save new Version and real file]
T --> C[Add C2PA edit receipt]
C --> X[Batch proof on X Layer]
T --> H[History, revert, branch]
| Feature | Status |
|---|---|
| Store real Version files; history, revert, and branch | Verified |
| Crop, compress, recolor, resize, and background removal | Verified |
| FLUX object removal, text replacement, chained edits, and image reroll | Verified with real calls |
| Image C2PA validation and X Layer proof | Verified on X Layer mainnet |
| Aleph 2 object removal and guarded video handling | Verified with one real paid render |
| FFmpeg long-video overlays, captions, transitions, masks, grading, LUT and audio ducking | Verified locally with real encoded outputs |
| MP4 C2PA, video revert/branch, and X Layer proof | Verified on X Layer mainnet |
| Motion brush, exact video text replacement, and lip-sync | Unavailable; requests stop without a render |
| Real image/video text detection with selectable IDs and regions | Verified locally |
| Live OKX listing and real USDT settlement | Not yet verified |
| Public Timeline and Docs pages | Not yet deployed |
Exact task IDs, hashes, charges, and X Layer transactions are in the Verification Ledger.
The intended agent flow is:
history, revert, or branch later.Phase 8 is complete only after an outside agent pays for one image edit and one video edit in USDT on X Layer and receives both real outputs. Until then, the listing and payment status remain unverified.
These commands do not call a paid image or video provider:
python verify.py --track edittrail --phase 1
python verify.py --track edittrail --phase 2
python verify.py --track edittrail --phase 7
pytest -q tests/test_edittrail_video.py
Do not casually rerun Phases 3, 4, 5, or 6. Their paid and on-chain evidence already exists, and Phase 4 can anchor pending Versions.
Apache-2.0. See LICENSE. Hosted engines and their outputs are also subject to their providers' terms, described in CREDITS.md.
88 commits
Python
98.5%