Skip to content
Go To Dashboard

Generate Images

Generate images from text prompts, transform existing images, upscale, and generate video — paying per output, with no model accounts to manage.

Image generation is on the typed ctx.sapiom.* client, so sapiom_dev_agents_check validates the call at author time:

const { images } = await ctx.sapiom.contentGeneration.images.create({
prompt: "a serene mountain lake at dawn",
numImages: 1,
// storage: { ... } // optional — persist each output to file storage
});
console.log(images[0].url);

Video generation lives alongside it at ctx.sapiom.contentGeneration.video. Autocomplete surfaces the full input and response types. See Using Capabilities.

From any MCP client, reach image generation — plus transforms and upscaling — through the remote MCP as sapiom_* tools. Run tool_discover with your goal to get the exact tool and a call example.

Outside an agent, call the same capability through the typed client — see SDK & API:

const { images } = await sapiom.contentGeneration.images.create({ prompt: "..." });