Skip to main content
Glama

replicate-flux-mcp

image.ts946 B
import { FileOutput } from "replicate"; export async function outputToBase64(output: FileOutput) { const blob = await output.blob(); const buffer = Buffer.from(await blob.arrayBuffer()); return buffer.toString("base64"); } export async function urlToSvg(url: string) { try { const data = await fetch(url, { headers: { Authorization: `Bearer ${process.env.REPLICATE_API_TOKEN}`, }, }); const text = await data.text(); return text; } catch (error) { throw new Error("Error fetching svg"); } } export async function urlToBase64(url: string) { try { const data = await fetch(url, { headers: { Authorization: `Bearer ${process.env.REPLICATE_API_TOKEN}`, }, }); const blob = await data.blob(); let buffer = Buffer.from(await blob.arrayBuffer()); return buffer.toString("base64"); } catch (error) { throw new Error("Error fetching image"); } }

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/awkoy/replicate-flux-mcp'

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