Skip to main content
Glama

venice_upscale_image

Increase image resolution and quality using AI upscaling technology. Specify scale factor to enlarge images while maintaining 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

  • Handler function that sends the image and scale to Venice AI's /images/upscale endpoint via veniceAPI, parses the response, and returns success URL or error.
    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: image (string, base64 or URL), scale (number, optional default 2).
    { image: z.string().describe("Base64-encoded image data or URL"), scale: z.number().optional().default(2).describe("Upscale factor (2, 4, etc.)"), },
  • Direct registration of the venice_upscale_image tool on the MCP server within registerInferenceTools.
    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" }] }; } );
  • src/index.ts:16-16 (registration)
    Top-level call to registerInferenceTools which includes the venice_upscale_image tool.
    registerInferenceTools(server);
  • Shared helper function veniceAPI that performs authenticated fetch requests to Venice AI API endpoints.
    export async function veniceAPI(endpoint: string, options: RequestInit = {}): Promise<Response> { const url = `${BASE_URL}${endpoint}`; const headers: Record<string, string> = { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json", ...(options.headers as Record<string, string> || {}), }; return fetch(url, { ...options, headers }); }

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