portkey-ai
Version:
Node client library for the Portkey API
51 lines (50 loc) • 1.5 kB
TypeScript
import { ApiClientInterface } from '../_types/generalTypes';
import { ApiResource } from '../apiResource';
import { RequestOptions } from '../baseClient';
export interface ImagesBody {
prompt: string;
model?: string;
n?: number | null;
quality?: string;
response_format?: string | null;
size?: string | null;
style?: string | null;
user?: string;
[key: string]: any;
}
export interface ImageEditParams {
image: any;
prompt: string;
mask?: any;
model?: string | null;
n?: number | null;
response_format?: string | null;
size?: string | null;
user?: string;
[key: string]: any;
}
export interface ImageCreateVariationParams {
image: any;
model?: string | null;
n?: number | null;
response_format?: string | null;
size?: string | null;
user?: string;
[key: string]: any;
}
export interface ImagesResponse {
created: number;
data: Array<Image>;
[key: string]: any;
}
export interface Image {
b64_json?: string;
revised_prompt?: string;
url?: string;
[key: string]: any;
}
export declare class Images extends ApiResource {
generate(_body: ImagesBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<ImagesResponse>;
edit(_body: ImageEditParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<ImagesResponse>;
createVariation(_body: ImageCreateVariationParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<ImagesResponse>;
}