/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/": { /** Home */ get: operations["home__get"]; }; "/v1/generation/text-to-image": { /** Text2Img Generation */ post: operations["text2img_generation_v1_generation_text_to_image_post"]; }; "/v1/generation/image-upscale-vary": { /** Img Upscale Or Vary */ post: operations["img_upscale_or_vary_v1_generation_image_upscale_vary_post"]; }; "/v1/generation/image-inpait-outpaint": { /** Img Inpaint Or Outpaint */ post: operations["img_inpaint_or_outpaint_v1_generation_image_inpait_outpaint_post"]; }; "/v1/generation/image-prompt": { /** Img Prompt */ post: operations["img_prompt_v1_generation_image_prompt_post"]; }; "/v1/generation/query-job": { /** * Query Job * @description Query async generation job */ get: operations["query_job_v1_generation_query_job_get"]; }; "/v1/generation/job-queue": { /** * Job Queue * @description Query job queue info */ get: operations["job_queue_v1_generation_job_queue_get"]; }; "/v1/generation/stop": { /** * Stop * @description Job stoping */ post: operations["stop_v1_generation_stop_post"]; }; "/v1/engines/all-models": { /** * All Models * @description Get all filenames of base model and lora */ get: operations["all_models_v1_engines_all_models_get"]; }; "/v1/engines/refresh-models": { /** * Refresh Models * @description Refresh local files and get all filenames of base model and lora */ post: operations["refresh_models_v1_engines_refresh_models_post"]; }; "/v1/engines/styles": { /** * All Styles * @description Get all legal Fooocus styles */ get: operations["all_styles_v1_engines_styles_get"]; }; } export type webhooks = Record; export interface components { schemas: { /** AdvancedParams */ AdvancedParams: { /** * Disable Preview * @description Disable preview during generation * @default false */ disable_preview?: boolean; /** * Adm Scaler Positive * @description Positive ADM Guidance Scaler * @default 1.5 */ adm_scaler_positive?: number; /** * Adm Scaler Negative * @description Negative ADM Guidance Scaler * @default 0.8 */ adm_scaler_negative?: number; /** * Adm Scaler End * @description ADM Guidance End At Step * @default 0.3 */ adm_scaler_end?: number; /** * Refiner Swap Method * @description Refiner swap method * @default joint */ refiner_swap_method?: string; /** * Adaptive Cfg * @description CFG Mimicking from TSNR * @default 7 */ adaptive_cfg?: number; /** * Sampler Name * @description Sampler * @default dpmpp_2m_sde_gpu */ sampler_name?: string; /** * Scheduler Name * @description Scheduler * @default karras */ scheduler_name?: string; /** * Overwrite Step * @description Forced Overwrite of Sampling Step * @default -1 */ overwrite_step?: number; /** * Overwrite Switch * @description Forced Overwrite of Refiner Switch Step * @default -1 */ overwrite_switch?: number; /** * Overwrite Width * @description Forced Overwrite of Generating Width * @default -1 */ overwrite_width?: number; /** * Overwrite Height * @description Forced Overwrite of Generating Height * @default -1 */ overwrite_height?: number; /** * Overwrite Vary Strength * @description Forced Overwrite of Denoising Strength of "Vary" * @default -1 */ overwrite_vary_strength?: number; /** * Overwrite Upscale Strength * @description Forced Overwrite of Denoising Strength of "Upscale" * @default -1 */ overwrite_upscale_strength?: number; /** * Mixing Image Prompt And Vary Upscale * @description Mixing Image Prompt and Vary/Upscale * @default false */ mixing_image_prompt_and_vary_upscale?: boolean; /** * Mixing Image Prompt And Inpaint * @description Mixing Image Prompt and Inpaint * @default false */ mixing_image_prompt_and_inpaint?: boolean; /** * Debugging Cn Preprocessor * @description Debug Preprocessors * @default false */ debugging_cn_preprocessor?: boolean; /** * Skipping Cn Preprocessor * @description Skip Preprocessors * @default false */ skipping_cn_preprocessor?: boolean; /** * Controlnet Softness * @description Softness of ControlNet * @default 0.25 */ controlnet_softness?: number; /** * Canny Low Threshold * @description Canny Low Threshold * @default 64 */ canny_low_threshold?: number; /** * Canny High Threshold * @description Canny High Threshold * @default 128 */ canny_high_threshold?: number; /** * Freeu Enabled * @description FreeU enabled * @default false */ freeu_enabled?: boolean; /** * Freeu B1 * @description FreeU B1 * @default 1.01 */ freeu_b1?: number; /** * Freeu B2 * @description FreeU B2 * @default 1.02 */ freeu_b2?: number; /** * Freeu S1 * @description FreeU B3 * @default 0.99 */ freeu_s1?: number; /** * Freeu S2 * @description FreeU B4 * @default 0.95 */ freeu_s2?: number; /** * Debugging Inpaint Preprocessor * @description Debug Inpaint Preprocessing * @default false */ debugging_inpaint_preprocessor?: boolean; /** * Inpaint Disable Initial Latent * @description Disable initial latent in inpaint * @default false */ inpaint_disable_initial_latent?: boolean; /** * Inpaint Engine * @description Inpaint Engine * @default v1 */ inpaint_engine?: string; /** * Inpaint Strength * @description Inpaint Denoising Strength * @default 1 */ inpaint_strength?: number; /** * Inpaint Respective Field * @description Inpaint Respective Field * @default 1 */ inpaint_respective_field?: number; }; /** AllModelNamesResponse */ AllModelNamesResponse: { /** * Model Filenames * @description All available model filenames */ model_filenames: string[]; /** * Lora Filenames * @description All available lora filenames */ lora_filenames: string[]; }; /** AsyncJobResponse */ AsyncJobResponse: { /** * Job Id * @description Job ID */ job_id: number; /** @description Job type */ job_type: components["schemas"]["TaskType"]; /** @description Job running stage */ job_stage: components["schemas"]["AsyncJobStage"]; /** * Job Progess * @description Job running progress, 100 is for finished. */ job_progess: number; /** * Job Status * @description Job running status in text */ job_status?: string | null; /** * Job Step Preview * @description Preview image of generation steps at current time, as base64 image */ job_step_preview?: string | null; /** * Job Result * @description Job generation result */ job_result?: components["schemas"]["GeneratedImageResult"][] | null; }; /** * AsyncJobStage * @enum {string} */ AsyncJobStage: "WAITING" | "RUNNING" | "SUCCESS" | "ERROR"; /** Body_img_inpaint_or_outpaint_v1_generation_image_inpait_outpaint_post */ Body_img_inpaint_or_outpaint_v1_generation_image_inpait_outpaint_post: { /** * Input Image * Format: binary * @description Init image for inpaint or outpaint */ input_image: string; /** * Input Mask * Format: binary * @description Inpaint or outpaint mask */ input_mask?: string; /** * Inpaint Additional Prompt * @description Describe what you want to inpaint */ inpaint_additional_prompt?: string | null; /** * Outpaint Selections * @description Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' seperated by comma * @default [] */ outpaint_selections?: string[]; /** * Prompt * @default */ prompt?: string; /** * Negative Prompt * @default */ negative_prompt?: string; /** * Style Selections * @description Fooocus style selections, seperated by comma * @default [ * "Fooocus V2", * "Fooocus Enhance", * "Fooocus Sharp" * ] */ style_selections?: string[]; /** @default Speed */ performance_selection?: components["schemas"]["PerfomanceSelection"]; /** * Aspect Ratios Selection * @default 1152×896 */ aspect_ratios_selection?: string; /** * Image Number * @description Image number * @default 1 */ image_number?: number; /** * Image Seed * @description Seed to generate image, -1 for random * @default -1 */ image_seed?: number; /** * Sharpness * @default 2 */ sharpness?: number; /** * Guidance Scale * @default 4 */ guidance_scale?: number; /** * Base Model Name * @default juggernautXL_version6Rundiffusion.safetensors */ base_model_name?: string; /** * Refiner Model Name * @default None */ refiner_model_name?: string; /** * Refiner Switch * @description Refiner Switch At * @default 0.5 */ refiner_switch?: number; /** * Loras * @description Lora config in JSON. Format as [{"model_name": "sd_xl_offset_example-lora_1.0.safetensors", "weight": 0.5}] * @default [{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}] */ loras?: string | null; /** * Advanced Params * @description Advanced parameters in JSON */ advanced_params?: string | null; /** * Require Base64 * @description Return base64 data of generated image * @default false */ require_base64?: boolean; /** * Async Process * @description Set to true will run async and return job info for retrieve generataion result later * @default false */ async_process?: boolean; }; /** Body_img_prompt_v1_generation_image_prompt_post */ Body_img_prompt_v1_generation_image_prompt_post: { /** * Cn Img1 * Format: binary * @description Input image for image prompt */ cn_img1?: string; /** * Cn Stop1 * @description Stop at for image prompt, None for default value */ cn_stop1?: number | null; /** * Cn Weight1 * @description Weight for image prompt, None for default value */ cn_weight1?: number | null; /** * @description ControlNet type for image prompt * @default ImagePrompt */ cn_type1?: components["schemas"]["ControlNetType"]; /** * Cn Img2 * Format: binary * @description Input image for image prompt */ cn_img2?: string; /** * Cn Stop2 * @description Stop at for image prompt, None for default value */ cn_stop2?: number | null; /** * Cn Weight2 * @description Weight for image prompt, None for default value */ cn_weight2?: number | null; /** * @description ControlNet type for image prompt * @default ImagePrompt */ cn_type2?: components["schemas"]["ControlNetType"]; /** * Cn Img3 * Format: binary * @description Input image for image prompt */ cn_img3?: string; /** * Cn Stop3 * @description Stop at for image prompt, None for default value */ cn_stop3?: number | null; /** * Cn Weight3 * @description Weight for image prompt, None for default value */ cn_weight3?: number | null; /** * @description ControlNet type for image prompt * @default ImagePrompt */ cn_type3?: components["schemas"]["ControlNetType"]; /** * Cn Img4 * Format: binary * @description Input image for image prompt */ cn_img4?: string; /** * Cn Stop4 * @description Stop at for image prompt, None for default value */ cn_stop4?: number | null; /** * Cn Weight4 * @description Weight for image prompt, None for default value */ cn_weight4?: number | null; /** * @description ControlNet type for image prompt * @default ImagePrompt */ cn_type4?: components["schemas"]["ControlNetType"]; /** * Prompt * @default */ prompt?: string; /** * Negative Prompt * @default */ negative_prompt?: string; /** * Style Selections * @description Fooocus style selections, seperated by comma * @default [ * "Fooocus V2", * "Fooocus Enhance", * "Fooocus Sharp" * ] */ style_selections?: string[]; /** @default Speed */ performance_selection?: components["schemas"]["PerfomanceSelection"]; /** * Aspect Ratios Selection * @default 1152×896 */ aspect_ratios_selection?: string; /** * Image Number * @description Image number * @default 1 */ image_number?: number; /** * Image Seed * @description Seed to generate image, -1 for random * @default -1 */ image_seed?: number; /** * Sharpness * @default 2 */ sharpness?: number; /** * Guidance Scale * @default 4 */ guidance_scale?: number; /** * Base Model Name * @default juggernautXL_version6Rundiffusion.safetensors */ base_model_name?: string; /** * Refiner Model Name * @default None */ refiner_model_name?: string; /** * Refiner Switch * @description Refiner Switch At * @default 0.5 */ refiner_switch?: number; /** * Loras * @description Lora config in JSON. Format as [{"model_name": "sd_xl_offset_example-lora_1.0.safetensors", "weight": 0.5}] * @default [{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}] */ loras?: string | null; /** * Advanced Params * @description Advanced parameters in JSON */ advanced_params?: string | null; /** * Require Base64 * @description Return base64 data of generated image * @default false */ require_base64?: boolean; /** * Async Process * @description Set to true will run async and return job info for retrieve generataion result later * @default false */ async_process?: boolean; }; /** Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post */ Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post: { /** * Input Image * Format: binary * @description Init image for upsacale or outpaint */ input_image: string; uov_method: components["schemas"]["UpscaleOrVaryMethod"]; /** * Prompt * @default */ prompt?: string; /** * Negative Prompt * @default */ negative_prompt?: string; /** * Style Selections * @description Fooocus style selections, seperated by comma * @default [ * "Fooocus V2", * "Fooocus Enhance", * "Fooocus Sharp" * ] */ style_selections?: string[]; /** @default Speed */ performance_selection?: components["schemas"]["PerfomanceSelection"]; /** * Aspect Ratios Selection * @default 1152×896 */ aspect_ratios_selection?: string; /** * Image Number * @description Image number * @default 1 */ image_number?: number; /** * Image Seed * @description Seed to generate image, -1 for random * @default -1 */ image_seed?: number; /** * Sharpness * @default 2 */ sharpness?: number; /** * Guidance Scale * @default 4 */ guidance_scale?: number; /** * Base Model Name * @default juggernautXL_version6Rundiffusion.safetensors */ base_model_name?: string; /** * Refiner Model Name * @default None */ refiner_model_name?: string; /** * Refiner Switch * @description Refiner Switch At * @default 0.5 */ refiner_switch?: number; /** * Loras * @description Lora config in JSON. Format as [{"model_name": "sd_xl_offset_example-lora_1.0.safetensors", "weight": 0.5}] * @default [{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}] */ loras?: string | null; /** * Advanced Params * @description Advanced parameters in JSON */ advanced_params?: string | null; /** * Require Base64 * @description Return base64 data of generated image * @default false */ require_base64?: boolean; /** * Async Process * @description Set to true will run async and return job info for retrieve generataion result later * @default false */ async_process?: boolean; }; /** * ControlNetType * @enum {string} */ ControlNetType: "ImagePrompt" | "FaceSwap" | "PyraCanny" | "CPDS"; /** GeneratedImageResult */ GeneratedImageResult: { /** * Base64 * @description Image encoded in base64, or null if finishReasen is not 'SUCCESS', only return when request require base64 */ base64: string | null; /** * Url * @description Image file static serve url, or null if finishReasen is not 'SUCCESS' */ url: string | null; /** * Seed * @description The seed associated with this image */ seed: number; finish_reason: components["schemas"]["GenerationFinishReason"]; }; /** * GenerationFinishReason * @enum {string} */ GenerationFinishReason: "SUCCESS" | "QUEUE_IS_FULL" | "USER_CANCEL" | "ERROR"; /** HTTPValidationError */ HTTPValidationError: { /** Detail */ detail?: components["schemas"]["ValidationError"][]; }; /** JobQueueInfo */ JobQueueInfo: { /** * Running Size * @description The current running and waiting job count */ running_size: number; /** * Finished Size * @description Finished job cound (after auto clean) */ finished_size: number; /** * Last Job Id * @description Last submit generation job id */ last_job_id: number; }; /** Lora */ Lora: { /** Model Name */ model_name: string; /** * Weight * @default 0.5 */ weight?: number; }; /** * PerfomanceSelection * @enum {string} */ PerfomanceSelection: "Speed" | "Quality" | "Extreme Speed"; /** StopResponse */ StopResponse: { /** Msg */ msg: string; }; /** * TaskType * @enum {string} */ TaskType: "Text to Image" | "Image Upscale or Variation" | "Image Inpaint or Outpaint" | "Image Prompt"; /** Text2ImgRequest */ Text2ImgRequest: { /** * Prompt * @default */ prompt?: string; /** * Negative Prompt * @default */ negative_prompt?: string; /** * Style Selections * @default [ * "Fooocus V2", * "Fooocus Enhance", * "Fooocus Sharp" * ] */ style_selections?: string[]; /** @default Speed */ performance_selection?: components["schemas"]["PerfomanceSelection"]; /** * Aspect Ratios Selection * @default 1152×896 */ aspect_ratios_selection?: string; /** * Image Number * @description Image number * @default 1 */ image_number?: number; /** * Image Seed * @description Seed to generate image, -1 for random * @default -1 */ image_seed?: number; /** * Sharpness * @default 2 */ sharpness?: number; /** * Guidance Scale * @default 4 */ guidance_scale?: number; /** * Base Model Name * @default juggernautXL_version6Rundiffusion.safetensors */ base_model_name?: string; /** * Refiner Model Name * @default None */ refiner_model_name?: string; /** * Refiner Switch * @description Refiner Switch At * @default 0.5 */ refiner_switch?: number; /** * Loras * @default [ * { * "model_name": "sd_xl_offset_example-lora_1.0.safetensors", * "weight": 0.1 * } * ] */ loras?: components["schemas"]["Lora"][]; /** @description Advanced parameters */ advanced_params: components["schemas"]["AdvancedParams"] | null; /** * Require Base64 * @description Return base64 data of generated image * @default false */ require_base64?: boolean; /** * Async Process * @description Set to true will run async and return job info for retrieve generataion result later * @default false */ async_process?: boolean; }; /** * UpscaleOrVaryMethod * @enum {string} */ UpscaleOrVaryMethod: "Vary (Subtle)" | "Vary (Strong)" | "Upscale (1.5x)" | "Upscale (2x)" | "Upscale (Fast 2x)"; /** ValidationError */ ValidationError: { /** Location */ loc: (string | number)[]; /** Message */ msg: string; /** Error Type */ type: string; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export type external = Record; export interface operations { /** Home */ home__get: { responses: { /** @description Successful Response */ 200: { content: { "application/json": unknown; }; }; }; }; /** Text2Img Generation */ text2img_generation_v1_generation_text_to_image_post: { parameters: { header?: { accept?: string; }; }; requestBody: { content: { "application/json": components["schemas"]["Text2ImgRequest"]; }; }; responses: { /** @description PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON */ 200: { content: { "application/json": components["schemas"]["GeneratedImageResult"][] | components["schemas"]["AsyncJobResponse"]; "application/json async": unknown; "image/png": unknown; }; }; /** @description Validation Error */ 422: { content: { "application/json": components["schemas"]["HTTPValidationError"]; }; }; }; }; /** Img Upscale Or Vary */ img_upscale_or_vary_v1_generation_image_upscale_vary_post: { parameters: { header?: { accept?: string; }; }; requestBody: { content: { "multipart/form-data": components["schemas"]["Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post"]; }; }; responses: { /** @description PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON */ 200: { content: { "application/json": components["schemas"]["GeneratedImageResult"][] | components["schemas"]["AsyncJobResponse"]; "application/json async": unknown; "image/png": unknown; }; }; /** @description Validation Error */ 422: { content: { "application/json": components["schemas"]["HTTPValidationError"]; }; }; }; }; /** Img Inpaint Or Outpaint */ img_inpaint_or_outpaint_v1_generation_image_inpait_outpaint_post: { parameters: { header?: { accept?: string; }; }; requestBody: { content: { "multipart/form-data": components["schemas"]["Body_img_inpaint_or_outpaint_v1_generation_image_inpait_outpaint_post"]; }; }; responses: { /** @description PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON */ 200: { content: { "application/json": components["schemas"]["GeneratedImageResult"][] | components["schemas"]["AsyncJobResponse"]; "application/json async": unknown; "image/png": unknown; }; }; /** @description Validation Error */ 422: { content: { "application/json": components["schemas"]["HTTPValidationError"]; }; }; }; }; /** Img Prompt */ img_prompt_v1_generation_image_prompt_post: { parameters: { header?: { accept?: string; }; }; requestBody?: { content: { "multipart/form-data": components["schemas"]["Body_img_prompt_v1_generation_image_prompt_post"]; }; }; responses: { /** @description PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON */ 200: { content: { "application/json": components["schemas"]["GeneratedImageResult"][] | components["schemas"]["AsyncJobResponse"]; "application/json async": unknown; "image/png": unknown; }; }; /** @description Validation Error */ 422: { content: { "application/json": components["schemas"]["HTTPValidationError"]; }; }; }; }; /** * Query Job * @description Query async generation job */ query_job_v1_generation_query_job_get: { parameters: { query: { job_id: number; require_step_preivew?: boolean; }; }; responses: { /** @description Successful Response */ 200: { content: { "application/json": components["schemas"]["AsyncJobResponse"]; }; }; /** @description Validation Error */ 422: { content: { "application/json": components["schemas"]["HTTPValidationError"]; }; }; }; }; /** * Job Queue * @description Query job queue info */ job_queue_v1_generation_job_queue_get: { responses: { /** @description Successful Response */ 200: { content: { "application/json": components["schemas"]["JobQueueInfo"]; }; }; }; }; /** * Stop * @description Job stoping */ stop_v1_generation_stop_post: { responses: { /** @description Successful Response */ 200: { content: { "application/json": components["schemas"]["StopResponse"]; }; }; }; }; /** * All Models * @description Get all filenames of base model and lora */ all_models_v1_engines_all_models_get: { responses: { /** @description Successful Response */ 200: { content: { "application/json": components["schemas"]["AllModelNamesResponse"]; }; }; }; }; /** * Refresh Models * @description Refresh local files and get all filenames of base model and lora */ refresh_models_v1_engines_refresh_models_post: { responses: { /** @description Successful Response */ 200: { content: { "application/json": components["schemas"]["AllModelNamesResponse"]; }; }; }; }; /** * All Styles * @description Get all legal Fooocus styles */ all_styles_v1_engines_styles_get: { responses: { /** @description Successful Response */ 200: { content: { "application/json": string[]; }; }; }; }; }