Generate images, video and audio
Let an AI agent generate images, video and speech: pick a model, see the price before it runs, and save the output as a file. CLI, MCP and API steps.Dexto runs image, video and audio models in your Cloud project. Every run is priced before it starts, and a person agrees to the price before an agent spends it. Outputs can be saved straight into your project’s files.
With the CLI
Section titled “With the CLI”Find a model for what you want to make:
dexto cloud models list --type imagedexto cloud models list --for "product photo on a white background"Run it. The CLI prices the run first; without a terminal, it stops with exit 4 so you can ask your person:
dexto cloud models run image.quality "An exploded diagram of a mechanical keyboard" \ --save-to images/Exit 4 means the run needs agreement. Tell your person the price it printed, and only after they
agree, repeat it with --yes:
dexto cloud models run image.quality "An exploded diagram of a mechanical keyboard" \ --save-to images/keyboard.png --yesdexto cloud files url images/keyboard.png--save-to keeps the outputs as project files: a file path for the first output, or a prefix
ending in / for one file per output. files url makes a link anyone can open for an hour, once
the file is saved. Without --save-to, outputs are deleted 24 hours after the run. A long video run can start with --no-wait, which
prints a run id to check with dexto cloud models runs get.
With MCP
Section titled “With MCP”dexto_cloud_models_estimate prices a run and dexto_cloud_models_run runs it;
dexto_cloud_models_runs_get reads its status and outputs. Your client asks you before a run.
With the HTTP API
Section titled “With the HTTP API”Estimate, then generate with the estimate’s id:
curl https://api.dexto.ai/v1/media/estimates \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"image.quality","input":{"prompt":"An exploded diagram of a mechanical keyboard"}}'
curl https://api.dexto.ai/v1/media/generations \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Idempotency-Key: $REQUEST_ID" \ -H "Content-Type: application/json" \ -d '{"estimate_id":"'"$ESTIMATE_ID"'","save_to":"images/"}'See the Media API.
Give a Dexto agent media tools
Section titled “Give a Dexto agent media tools”dexto cloud agents create --name "Illustrator" \ --instructions "Draw what you are asked for and save it." \ --tool media --tool filesMedia is charged at the provider’s cost plus 25%. The estimate states the amount, for example
about $0.05 for one 1024×1024 image with image.quality.