Provides MCP protocol-based image generation API with customizable dimensions, seed control for reproducible results, asynchronous streaming, and seamless integration with Hugging Face model services.
Unlock the full potential of Flux Schnell Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
基于Flux Schnell模型的MCP图像生成服务器。
uv venv && source .venv/bin/activate # Unix/macOS # 或 .venv\Scripts\activate # Windows
uv sync # 以可编辑模式安装项目
mcp dev main.py 或者 npx -y @modelcontextprotocol/inspector uv run main.py
# 示例代码 async def test_main(): img_url = await image_generation( prompt="your prompt here", image_width=512, # 可选,默认512 image_height=512, # 可选,默认512 seed=3 # 可选,默认3 ) print(img_url)
prompt
(str): 图像生成提示词image_width
(int, optional): 生成图片宽度,默认512image_height
(int, optional): 生成图片高度,默认512seed
(int, optional): 随机种子,默认3春天来了,大地苏醒,万物复苏。花儿竞相开放,嫩绿的叶子在微风中轻轻摇曳。空气中弥漫着泥土的芬芳和花儿的香气。小鸟在枝头欢快地歌唱,蝴蝶在花丛中翩翩起舞。阳光洒在大地上,温暖而明亮。春天的生机勃勃,让人心旷神怡。
这个示例展示了使用服务生成的图片效果。您可以在demo目录中找到完整的网页展示代码。
生成的图片URL可以直接用于:
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!