imagine-func.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import Parse from 'parse';
  2. /**
  3. * DalleOptions 绘画参数接口
  4. * @public
  5. */
  6. export interface DalleOptions {
  7. prompt: string;
  8. quality?: null | "hd";
  9. n?: 1;
  10. model?: "dall-e-3" | "dall-e-2";
  11. size?: "1024x1024" | "1792x1024" | "1024x1792";
  12. style?: "vivid" | "natural";
  13. }
  14. /**
  15. * DALL-E-3 图片生成函数
  16. * @description
  17. * @see
  18. * https://p4.hosteagle.club/docs/api-reference?__cpo=aHR0cHM6Ly9wbGF0Zm9ybS5vcGVuYWkuY29t
  19. * @returns
  20. * {
  21. "id": "lpJGiFwWeA", // 图片生成任务ID
  22. "createdAt": "2024-11-27T12:18:14.463Z"
  23. }
  24. * @param {DalleOptions} options
  25. * @param {string} options.prompt 1000 characters for dall-e-2 and 4000 characters for dall-e-3.
  26. * @param {string} options.model dall-e-3 dall-e-2
  27. * @param {string} options.quality dall-e-3 only hd means more details & consistency
  28. * @param {string} options.response_format url | b64_json
  29. * @param {string} options.size 1024x1024, 1792x1024, or 1024x1792 for dall-e-3
  30. * @param {string} options.style vivid | natural dall-e-3 only
  31. */
  32. export declare function drawDalle(options: DalleOptions): Promise<Parse.Object<Parse.Attributes>>;