@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
52 lines (49 loc) • 1.65 kB
JavaScript
import { APIResource } from '../resource.js';
import { multipartFormRequestOptions } from '../uploads.js';
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
class Images extends APIResource {
/**
* Creates a variation of a given image. This endpoint only supports `dall-e-2`.
*
* @example
* ```ts
* const imagesResponse = await client.images.createVariation({
* image: fs.createReadStream('otter.png'),
* });
* ```
*/
createVariation(body, options) {
return this._client.post('/images/variations', multipartFormRequestOptions({ body, ...options }));
}
/**
* Creates an edited or extended image given one or more source images and a
* prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
*
* @example
* ```ts
* const imagesResponse = await client.images.edit({
* image: fs.createReadStream('path/to/file'),
* prompt: 'A cute baby sea otter wearing a beret',
* });
* ```
*/
edit(body, options) {
return this._client.post('/images/edits', multipartFormRequestOptions({ body, ...options }));
}
/**
* Creates an image given a prompt.
* [Learn more](https://platform.openai.com/docs/guides/images).
*
* @example
* ```ts
* const imagesResponse = await client.images.generate({
* prompt: 'A cute baby sea otter',
* });
* ```
*/
generate(body, options) {
return this._client.post('/images/generations', { body, ...options });
}
}
export { Images };
//# sourceMappingURL=images.js.map