stability-ai
Version:
Node SDK for Stability AI REST API
56 lines (55 loc) • 1.95 kB
TypeScript
import { OutputFormat, StabilityAIContentResponse, StabilityAIStatusResult } from '../../util';
import StabilityAI from '../..';
export type ConservativeUpscaleRequest = [
image: string,
prompt: string,
options?: {
negativePrompt?: string;
outputFormat?: OutputFormat;
seed?: number;
creativity?: number;
}
];
/**
* Stability AI Stable Image Conservative Upscale (v2beta)
*
* @param image - Local filepath or public URL of the image to upscale
* @param prompt - Prompt to use for upscaling
* @param options - Extra options for the upscale
*/
export declare function conservative(this: StabilityAI, ...args: ConservativeUpscaleRequest): Promise<StabilityAIContentResponse>;
export type CreativeUpscaleRequest = [
image: string,
prompt: string,
options?: {
negativePrompt?: string;
outputFormat?: OutputFormat;
seed?: number;
creativity?: number;
}
];
export type CreativeUpscaleResponse = {
id: string;
outputFormat: OutputFormat;
};
/**
* Stability AI Stable Image Start Creative Upscale (v2beta)
*
* @param image - Local filepath or public URL of the image to upscale
* @param prompt - Prompt to use for upscaling
* @param options - Extra options for the upscale
*/
export declare function startCreative(this: StabilityAI, ...args: CreativeUpscaleRequest): Promise<CreativeUpscaleResponse>;
export type CreativeUpscaleResultRequest = [
id: string,
outputFormat: OutputFormat
];
export type CreativeUpscaleResultResponse = StabilityAIContentResponse | StabilityAIStatusResult;
/**
* Stability AI Stable Image Fetch Creative Upscale Result (v2beta)
*
* @param id - ID of the upscale job
* @param output_format - Output format requested in original upscale request
* @returns
*/
export declare function fetchCreativeResult(this: StabilityAI, ...args: CreativeUpscaleResultRequest): Promise<CreativeUpscaleResultResponse>;