api-config.json 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. "name": "jimeng-work-result",
  3. "displayName": "即梦作品结果查询",
  4. "description": "根据 workId 查询 ImagineWork 表,获取生成的图片/视频 URL。在 jimeng-task-query 返回 isFinish:true 后调用此接口获取最终结果。",
  5. "category": "jimeng",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "GET",
  9. "url": "https://server.fmode.cn/parse/classes/ImagineWork/{{workId}}",
  10. "headers": {
  11. "X-Parse-Application-Id": "ncloudmaster"
  12. }
  13. },
  14. "parameters": {
  15. "type": "object",
  16. "required": ["workId"],
  17. "properties": {
  18. "workId": {
  19. "type": "string",
  20. "description": "生成任务返回的 workId(即 ImagineWork 表的 objectId),来自提交任务接口的响应"
  21. }
  22. }
  23. },
  24. "response": {
  25. "type": "object",
  26. "description": "ImagineWork 记录,包含生成结果",
  27. "properties": {
  28. "objectId": {
  29. "type": "string",
  30. "description": "记录ID(即 workId)"
  31. },
  32. "images": {
  33. "type": "array",
  34. "items": { "type": "string" },
  35. "description": "图片 URL 列表(已转存华为云OBS,永久有效)。图片生成类任务的结果在此字段"
  36. },
  37. "videos": {
  38. "type": "array",
  39. "items": { "type": "string" },
  40. "description": "视频 URL 列表(已转存,永久有效)。视频生成类任务的结果在此字段"
  41. },
  42. "prompt": {
  43. "type": "string",
  44. "description": "原始提示词"
  45. },
  46. "progress": {
  47. "type": "number",
  48. "description": "生成进度,1 表示完成"
  49. },
  50. "usage": {
  51. "type": "object",
  52. "description": "扣费详情"
  53. }
  54. }
  55. },
  56. "notes": "此接口通过 Parse REST API 直接查询 LeanCloud 的 ImagineWork 表。images/videos 中的 URL 已转存至华为云 OBS,永久有效。图片生成类 skill(text2img、img2img、img-v4 等)结果在 images 字段;视频生成类 skill(video-v3、actor 等)结果在 videos 字段。",
  57. "usageExamples": [
  58. {
  59. "name": "查询文生图结果",
  60. "input": {
  61. "workId": "WCAMhCMpG4"
  62. },
  63. "description": "查询 workId 对应的图片生成结果,返回 images 数组",
  64. "expectedOutput": {
  65. "objectId": "WCAMhCMpG4",
  66. "images": ["https://nova-cloud.obs.cn-south-1.myhuaweicloud.com/storage/aigc/imagine/WCAMhCMpG4-0.png"],
  67. "videos": null,
  68. "prompt": "一只可爱的橘猫在阳光下打盹,水彩画风格",
  69. "progress": 1
  70. }
  71. }
  72. ],
  73. "relatedSkills": [
  74. "jimeng-task-query",
  75. "jimeng-text2img-v3",
  76. "jimeng-text2img-v31",
  77. "jimeng-img-v4",
  78. "jimeng-video-v3-720p"
  79. ],
  80. "timeout": 10000,
  81. "retry": {
  82. "maxAttempts": 2,
  83. "delay": 1000,
  84. "backoffMultiplier": 2
  85. }
  86. }