1
1
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
- import * as Core from '../core' ;
4
3
import { APIResource } from '../resource' ;
4
+ import * as Core from '../core' ;
5
5
import * as ImagesAPI from './images' ;
6
- import { type Uploadable , multipartFormRequestOptions } from '../core' ;
7
6
8
7
export class Images extends APIResource {
9
8
/**
@@ -13,14 +12,14 @@ export class Images extends APIResource {
13
12
body : ImageCreateVariationParams ,
14
13
options ?: Core . RequestOptions ,
15
14
) : Core . APIPromise < ImagesResponse > {
16
- return this . _client . post ( '/images/variations' , multipartFormRequestOptions ( { body, ...options } ) ) ;
15
+ return this . _client . post ( '/images/variations' , Core . multipartFormRequestOptions ( { body, ...options } ) ) ;
17
16
}
18
17
19
18
/**
20
19
* Creates an edited or extended image given an original image and a prompt.
21
20
*/
22
21
edit ( body : ImageEditParams , options ?: Core . RequestOptions ) : Core . APIPromise < ImagesResponse > {
23
- return this . _client . post ( '/images/edits' , multipartFormRequestOptions ( { body, ...options } ) ) ;
22
+ return this . _client . post ( '/images/edits' , Core . multipartFormRequestOptions ( { body, ...options } ) ) ;
24
23
}
25
24
26
25
/**
@@ -64,7 +63,7 @@ export interface ImageCreateVariationParams {
64
63
* The image to use as the basis for the variation(s). Must be a valid PNG file,
65
64
* less than 4MB, and square.
66
65
*/
67
- image : Uploadable ;
66
+ image : Core . Uploadable ;
68
67
69
68
/**
70
69
* The model to use for image generation. Only `dall-e-2` is supported at this
@@ -104,7 +103,7 @@ export interface ImageEditParams {
104
103
* The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask
105
104
* is not provided, image must have transparency, which will be used as the mask.
106
105
*/
107
- image : Uploadable ;
106
+ image : Core . Uploadable ;
108
107
109
108
/**
110
109
* A text description of the desired image(s). The maximum length is 1000
@@ -117,7 +116,7 @@ export interface ImageEditParams {
117
116
* indicate where `image` should be edited. Must be a valid PNG file, less than
118
117
* 4MB, and have the same dimensions as `image`.
119
118
*/
120
- mask ?: Uploadable ;
119
+ mask ?: Core . Uploadable ;
121
120
122
121
/**
123
122
* The model to use for image generation. Only `dall-e-2` is supported at this
0 commit comments