CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
images.mjs25 linesDownload Raw Back to resources
1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.2import { APIResource } from "../core/resource.mjs";3import { multipartFormRequestOptions } from "../internal/uploads.mjs";4export class Images extends APIResource {5    /**6     * Creates a variation of a given image. This endpoint only supports `dall-e-2`.7     *8     * @example9     * ```ts10     * const imagesResponse = await client.images.createVariation({11     *   image: fs.createReadStream('otter.png'),12     * });13     * ```14     */15    createVariation(body, options) {16        return this._client.post('/images/variations', multipartFormRequestOptions({ body, ...options }, this._client));17    }18    edit(body, options) {19        return this._client.post('/images/edits', multipartFormRequestOptions({ body, ...options, stream: body.stream ?? false }, this._client));20    }21    generate(body, options) {22        return this._client.post('/images/generations', { body, ...options, stream: body.stream ?? false });23    }24}25//# sourceMappingURL=images.mjs.map
basant307/AI_Governance_Project · CoolFace