qwen-image-plus.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. "model_code": "qwen-image-plus",
  3. "model_intro": "通义千问系列图像生成模型,参数规模200亿。具备卓越的文本渲染能力,在复杂文本渲染、各类生成与编辑任务中表现出色,在多个公开基准测试中获得SOTA,模型性能大幅提升。",
  4. "model_tags": ["图片生成"],
  5. "model_capabilities": {
  6. "input_modalities": [
  7. "text"
  8. ],
  9. "output_modalities": [
  10. "image"
  11. ],
  12. "features": {
  13. "model_experience": true,
  14. "function_calling": false,
  15. "structured_output": false,
  16. "internet_search": false,
  17. "cache": false,
  18. "batch_inference": false,
  19. "model_optimization": false
  20. }
  21. },
  22. "model_pricing": {
  23. "image_generation": {
  24. "price_cny_per_image": 0.2,
  25. "unit": "元/每张"
  26. }
  27. },
  28. "model_limits": {
  29. "max_input_length": null,
  30. "max_output_length": null,
  31. "rpm": 120,
  32. "tpm": 100000
  33. },
  34. "api_examples": {
  35. "python": [
  36. "import json\\nimport os\\nimport dashscope\\nfrom dashscope import MultiModalConversation\\n\\ndashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'\\n\\nmessages = [\\n {\\n \"role\": \"user\",\\n \"content\": [\\n {\"text\": \"一副典雅庄重的对联悬挂于厅堂之中,房间是个安静古典的中式布置,桌子上放着一些青花瓷,对联上左书“义本生知人机同道善思新”,右书“通云赋智乾坤启数高志远”, 横批“智启通义”,字体飘逸,中间挂在一着一副中国风的画作,内容是岳阳楼。\"}\\n ]\\n }\\n]\\n\\n# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key=\"sk-xxx\"\\napi_key = os.getenv(\"DASHSCOPE_API_KEY\")\\n\\nresponse = MultiModalConversation.call(\\n api_key=api_key,\\n model=\"qwen-image-plus\",\\n messages=messages,\\n result_format='message',\\n stream=False,\\n watermark=False,\\n prompt_extend=True,\\n negative_prompt='',\\n size='1328*1328'\\n)\\n\\nif response.status_code == 200:\\n print(json.dumps(response, ensure_ascii=False))\\nelse:\\n print(f\"HTTP返回码:{response.status_code}\")\\n print(f\"错误码:{response.code}\")\\n print(f\"错误信息:{response.message}\")\\n print(\"请参考文档:https://www.alibabacloud.com/help/zh/model-studio/error-code\")"
  37. ]
  38. }
  39. }