nmodels are supported status_code=500, not supported model for image generation,...
错误信息
nmodels are supported status_code=500, not supported model for image generation, only image
AI 解决方案
🔍 报错分析
1. 🌐 错误翻译
原文:nmodels are supported status_code=500, not supported model for image generation, only image
译文:不支持的模型,状态码=500,图像生成不支持该模型,仅支持图像相关模型
2. 🎯 原因分析
3. 💡 解决方案
检查并修改模型参数,使用平台支持的图像生成模型:
// 错误的示例(会导致500错误)
const response = await generateImage({
model: 'nmodels', // ❌ 不支持的模型
prompt: '生成一幅美丽的风景画'
});
// 正确的示例(使用平台支持的图像生成模型)
const response = await generateImage({
model: 'stable-diffusion', // ✅ 支持的图像生成模型
prompt: '生成一幅美丽的风景画'
});
或者检查API文档确认可用的图像生成模型列表:
// 获取支持的模型列表
const supportedModels = await getSupportedModels('image-generation');
// 从返回的列表中选择合适的模型,如:
// 'dall-e-2', 'stable-diffusion', 'midjourney-proxy' 等