# Web research and media generation

> Research with cited public sources, prepare a media brief, review a generation quote, and recover an existing result when downloading or saving fails.

Source: https://kaitoi.io/docs/cli/web-and-media/
Section: Kaitoi CLI / Working with Kaitoi Code
Written for: Anyone researching or creating media from Code.
Prerequisites: Kaitoi CLI signed in to an environment offering these tools; A trusted workspace for local media outputs
Last reviewed: 2026-10-24

---

Ask Code for research or media in plain language. Web search, page fetching,
and generation are model tools, not a separate set of invented slash commands.
This guide covers CLI **0.9.0** and a backend that offers the relevant features.

## Research with traceable sources

A useful request specifies the question, the source quality you need, and the
deliverable:

> Find the official documentation for this library's migration path. Cite the
> relevant pages, distinguish verified changes from assumptions, and summarize
> the work our project needs.

Code's web tools search and retrieve public page text through Kaitoi. They do
not control your logged-in browser, read private tabs, or attach to Studio's
live canvas. Local/private addresses are refused by the public fetch tool.
Blocked pages and access restrictions can prevent retrieval.

Fetched content is bounded. When a detail is missing, narrow the question or ask
for the relevant section; a returned excerpt is not necessarily the whole page.
Treat page text as evidence, not instructions that authorize local actions.
Ask Code to give direct source links and identify conclusions it inferred.

Managed web reads can incur charges even in Plan mode. Model inference and web
usage are separate costs; see [Costs and budgets](/docs/cli/prices/).

## Turn research into a production brief

For media, describe the intended use, dimensions or duration, content, tone,
reference material, and output location. Code can create images, video, speech,
music, sound effects, and 3D assets where the available tools and provider
capabilities support them. Attaching an image with `/image` supplies context;
it does not start generation.

> Prepare one square poster for a fictional Saturday book swap. Use the attached
> reference for color only. Show the quote and intended output path before
> generating it.


Public source links feed a brief containing purpose, format, and reference
constraints. The brief is then quoted and approved before generation. A
generated book-swap poster is an illustrative deliverable, not a real provider
output. Generation completion and local file saving are separate outcomes.
When the save fails, recover the existing run's output before requesting a new
generation.

The authored source clipping supplies a Saturday book-swap fact and a color-only palette. When the download example fails, its local file tray becomes empty while the already-produced poster and remote identifiers remain.

*Figure: Research informs the brief; an approved generation and a saved file are later steps.*

## Review the concrete generation

The quote/preflight selects the task preset and settings, estimates its price,
checks balance where available, and resolves input files and output paths.
Before generation, inspect the approval card, including any upload and file
replacement. An estimate is not a promise that every provider's final cost is
fixed. The quote itself does not spend generation credits; model work to
prepare it may still cost credits.

Media generation requires its own per-call approval. A local main model does
not make hosted generation free or remove sign-in requirements. Default outputs
are saved under `assets/generated` unless the request specifies another valid
workspace path.

## Check both the run and the file

After completion, inspect the returned asset, its run/file IDs, and the saved
local path. A generation may succeed and charge before a download or local save
fails. Ask Code to retrieve and save the existing output before retrying the
creative request.

Retries of the same prepared generation reuse its request identity, but a new
tool call is a new generation. Stopping the terminal after dispatch does not
prove the remote run stopped or remained uncharged. Preserve the returned
identifiers and inspect status when the result is uncertain.
