Skip to main content
Glama

venice_upscale_image

Increase image resolution and quality using AI upscaling. Upload an image and specify the scale factor to enhance details and clarity.

Instructions

Upscale an image using Venice AI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesBase64-encoded image data or URL
scaleNoUpscale factor (2, 4, etc.)

Implementation Reference

  • The asynchronous handler function that performs the image upscaling by calling the Venice API endpoint /images/upscale with the provided image and scale parameters, handles errors, and returns the upscaled image URL.
    async ({ image, scale }) => { const response = await veniceAPI("/images/upscale", { method: "POST", body: JSON.stringify({ image, scale }) }); const data = await response.json() as ImageUpscaleResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: data.data?.url ? `Upscaled: ${data.data.url}` : "Image upscaled" }] }; }
  • Zod schema defining the input parameters for the tool: image as base64 or URL string, and optional scale factor (default 2).
    image: z.string().describe("Base64-encoded image data or URL"), scale: z.number().optional().default(2).describe("Upscale factor (2, 4, etc.)"), },
  • Registration of the venice_upscale_image tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "venice_upscale_image", "Upscale an image using Venice AI", { image: z.string().describe("Base64-encoded image data or URL"), scale: z.number().optional().default(2).describe("Upscale factor (2, 4, etc.)"), }, async ({ image, scale }) => { const response = await veniceAPI("/images/upscale", { method: "POST", body: JSON.stringify({ image, scale }) }); const data = await response.json() as ImageUpscaleResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: data.data?.url ? `Upscaled: ${data.data.url}` : "Image upscaled" }] }; } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/georgeglarson/venice-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server