1
- declare module 'prodia-ai' {
1
+ /**
2
+ * ProdiaAI is a class for handling ProdiaAI images.
3
+ */
4
+ declare class ProdiaAI {
5
+ private readonly key : string
6
+
2
7
/**
3
- * ProdiaAI is a class for handling ProdiaAI images.
8
+ * Initializes a ProdiaAI instance.
9
+ * @param {Object } obj - Initialization parameters object.
10
+ * @param {String } obj.key - Your API key.
4
11
*/
5
- export default class ProdiaAI {
6
- #API_DOMAIN: string ;
7
- #API_VERSION : string ;
8
-
9
- /**
10
- * Initializes a ProdiaAI instance .
11
- * @param {Object } obj - Initialization parameters object .
12
- * @param {String } obj.key - Your API key .
13
- */
14
- constructor ( { key } : { key : string } ) ;
15
-
16
- models : string [ ] ;
17
-
18
- /**
19
- * Creates an AI image job.
20
- * @param { Object } config - Image job configuration.
21
- * @param { String } config. prompt - Image prompt.
22
- * @param { String } config. negative_prompt - Negative image prompt.
23
- * @param { Number } config. steps - Number of image generation steps.
24
- * @param { Number } config. cfg_scale - Image generation scale.
25
- * @param { String } config. sampler - Image generation sampler.
26
- * @param { String } config. model - Image generation model.
27
- * @returns { Promise<String> } - Promise with the API response content.
28
- */
29
- createJob ( config : {
30
- prompt : string ;
31
- negative_prompt : string ;
32
- steps : number ;
33
- cfg_scale : number ;
34
- sampler : string ;
35
- model : string ;
36
- } ) : Promise < string > ;
37
-
38
- /**
39
- * Retrieves information about a specific job ID .
40
- * @param { String } jobId - Job ID .
41
- * @returns { Promise<String> } - Promise with the API response content .
42
- */
43
- getJob ( jobId : string ) : Promise < string > ;
44
- }
45
- }
12
+ constructor ( key : string )
13
+
14
+ models : string [ ]
15
+
16
+ /**
17
+ * Creates an AI image job .
18
+ * @param {Object } config - Image job configuration .
19
+ * @param {String } config.prompt - Image prompt .
20
+ * @param { String } config.negative_prompt - Negative image prompt.
21
+ * @param { Number } config.steps - Number of image generation steps.
22
+ * @param { Number } config.cfg_scale - Image generation scale.
23
+ * @param { String } config.sampler - Image generation sampler.
24
+ * @param { String } config.model - Image generation model.
25
+ * @returns { Promise<String> } - Promise with the API response content.
26
+ */
27
+ createJob ( config : {
28
+ prompt : string
29
+ negative_prompt : string
30
+ steps : number
31
+ cfg_scale : number
32
+ sampler : string
33
+ model : string
34
+ } ) : Promise < string >
35
+
36
+ /**
37
+ * Retrieves information about a specific job ID.
38
+ * @param { String } jobId - Job ID.
39
+ * @returns { Promise<String> } - Promise with the API response content.
40
+ */
41
+ getJob ( jobId : string ) : Promise < string >
42
+ }
43
+
44
+ /**
45
+ * Creates an instance of ProdiaAI.
46
+ * @param { string } key - The API key used for authentication .
47
+ * @returns { ProdiaAI } The ProdiaAI instance .
48
+ * @throws { Error } If the API key is missing .
49
+ */
50
+ declare function createProdiaAI ( key : string ) : ProdiaAI
51
+
52
+ export default createProdiaAI
0 commit comments