> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi LoRA

> Create images from text using a variety of LoRA models.

<Check>
  You can find a list of the public and LoRA models available and their IDs **[here](https://modelslab.com/models)**.
</Check>

## Request

Make a `POST` request to below endpoint and pass the required parameters in the request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/images/text2img' \
```

## Body

```json json theme={null}
{  
  "key":"your_api_key",  
  "model_id": "f222-diffusion",  
  "prompt": "a female model doing photoshoot, ultra realistic face, ultra high resolution, 4K image",  
  "negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime",  
  "width": "512",  
  "height": "512",  
  "samples": "1",  
  "num_inference_steps": "31",  
  "safety_checker": "yes",  
  "seed": null,  
  "guidance_scale": 7.5,  
  "upscale": "no",  
  "lora_model": "teddy-jacket-v1-0,a-simple-china-dress-v6-0",  
  "lora_strength": "0.45,0.55",  
  "scheduler": "UniPCMultistepScheduler",  
  "webhook": null,  
  "track_id": null
}
```


## OpenAPI

````yaml POST /text2img
openapi: 3.1.0
info:
  title: ModelsLab Dreambooth Image Generation API
  description: >-
    A focused API for AI-driven image generation using Dreambooth models,
    including text-to-image, image-to-image, inpainting, and model management
    capabilities.
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6/images
    description: Dreambooth Image Generation API v6 server
security: []
paths:
  /text2img:
    post:
      summary: Text-to-Image
      description: >-
        Creates an image from a text prompt using Dreambooth models. This
        endpoint supports both single and multiple LoRA models for enhanced
        results.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextToImageRequest'
      responses:
        '200':
          description: Text-to-image generation response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageGenerationSuccessResponse'
                  - $ref: '#/components/schemas/ImageGenerationProcessingResponse'
                  - $ref: '#/components/schemas/ImageGenerationErrorResponse'
        '400':
          $ref: '#/components/responses/StandardErrorResponse'
        '401':
          $ref: '#/components/responses/StandardErrorResponse'
        '500':
          $ref: '#/components/responses/StandardErrorResponse'
components:
  schemas:
    TextToImageRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CommonImageGenerationParams'
      required:
        - key
        - model_id
        - prompt
      properties:
        model_id:
          type: string
          description: >-
            The ID of the model to be used. It can be a public model or one you
            have trained.
        multi_lingual:
          type: boolean
          default: false
          description: >-
            Allow multilingual prompts. Set to 'true' if using a language other
            than English.
        upscale:
          type: boolean
          default: false
          description: Set to 'true' to upscale the image resolution two times (2x).
        highres_fix:
          type: boolean
          default: false
          description: Enable high-resolution fix for generated images.
    ImageGenerationSuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the image generation.
        generationTime:
          type: number
          description: Time taken to generate the image in seconds.
        id:
          type: integer
          description: Unique identifier for the image generation request.
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated image URLs.
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs.
        meta:
          type: object
          description: Metadata about the image generation including all parameters used.
          additionalProperties: true
        nsfw_content_detected:
          type: boolean
          description: Indicates if NSFW content was detected in the generated image.
        webhook_status:
          type: string
          description: Status of the webhook notification.
        tip:
          type: string
          description: Additional information or tips for the user.
    ImageGenerationProcessingResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
          description: Status of the image generation.
        tip:
          type: string
          description: Information about faster processing options.
        tip_1:
          type: string
          description: Additional tip, usually pointing to the fetch API.
        eta:
          type: number
          description: Estimated time for completion in seconds.
        message:
          type: string
          description: Processing status message.
        webhook_status:
          type: string
          description: Status of the webhook notification.
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing.
        id:
          type: integer
          description: Unique identifier for the image generation request.
        output:
          type: array
          items:
            type: string
          description: Empty array during processing.
        meta:
          type: object
          description: Metadata about the image generation including all parameters used.
          additionalProperties: true
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future image URLs for queued requests.
    ImageGenerationErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description.
    CommonImageGenerationParams:
      type: object
      properties:
        key:
          type: string
          description: Your API Key used for request authorization.
        prompt:
          type: string
          description: A text description of what you want in the generated image.
        negative_prompt:
          type: string
          description: Items you don't want in the image.
        enhance_prompt:
          type: boolean
          default: 'yes'
          description: >-
            If true, the prompt will be enhanced for better results. Default is
            (true).
        width:
          type: integer
          default: 512
          maximum: 1024
          description: The width of the image in pixels.
        height:
          type: integer
          default: 512
          maximum: 1024
          description: The height of the image in pixels.
        samples:
          type: integer
          default: 1
          maximum: 4
          description: The number of images to be returned in response. Maximum is 4.
        num_inference_steps:
          type: integer
          default: 31
          minimum: 1
          maximum: 20
          description: >-
            The number of denoising steps. Values range from 1 to 20, and any
            value above 20 will be capped at 20.
        safety_checker:
          type: boolean
          default: false
          description: >-
            A checker for NSFW images. If detected, such images will be replaced
            by a blank image.
        safety_checker_type:
          $ref: '#/components/schemas/SafetyCheckerTypeEnum'
        seed:
          oneOf:
            - type: integer
            - type: 'null'
          description: >-
            Seed for reproducible results. The same seed generates the same
            image. Pass null for a random number.
        guidance_scale:
          type: number
          default: 7.5
          minimum: 1
          maximum: 20
          description: Scale for classifier-free guidance.
        use_karras_sigmas:
          type: boolean
          default: true
          description: Use Karras sigmas to generate images. Produces nice results.
        algorithm_type:
          type: string
          enum:
            - none
            - dpmsolver+++
          default: none
          description: Used in DPMSolverMultistepScheduler scheduler.
        vae:
          type: string
          nullable: true
          description: Use a custom VAE for generating images. Default is null.
        lora_strength:
          type: integer
          description: >-
            Strength of the LoRa model(s). If multiple LoRa models, provide
            comma-separated values (0.1 to 1).
        lora_model:
          type: string
          description: >-
            LoRa model ID(s). Multiple LoRa models are supported; pass
            comma-separated values (e.g., 'contrast-fix,yae-miko-genshin').
        clip_skip:
          type: integer
          default: 2
          minimum: 1
          maximum: 8
          description: Number of CLIP layers to skip.
        base64:
          type: boolean
          default: false
          description: >-
            If true, response output is base64 string. Input images can also be
            base64.
        temp:
          type: boolean
          default: false
          description: If true, stores image in temporary storage (cleaned every 24 hours).
        webhook:
          type: string
          format: uri
          description: URL to receive a POST API call once image generation is complete.
        track_id:
          type: string
          description: Unique ID used in webhook response to identify the request.
        ip_adapter_id:
          $ref: '#/components/schemas/IPAdapterIDEnum'
        ip_adapter_scale:
          type: number
          minimum: 0
          maximum: 1
          description: Scale for the IP adapter (0 to 1).
        ip_adapter_image:
          type: string
          format: uri
          description: Valid image URL for IP adapter.
        scheduler:
          $ref: '#/components/schemas/SchedulerEnum'
    SafetyCheckerTypeEnum:
      type: string
      enum:
        - blur
        - sensitive_content_text
        - pixelate
        - black
      default: sensitive_content_text
      description: How to modify the image if NSFW content is found.
    IPAdapterIDEnum:
      type: string
      enum:
        - ip-adapter_sdxl
        - ip-adapter_sd15
        - ip-adapter-plus-face_sd15
        - ip-adapter-plus_sdxl_vit-h
        - ip-adapter-plus-face_sdxl_vit-h
      description: IP adapter ID.
    SchedulerEnum:
      type: string
      enum:
        - DDPMScheduler
        - DDIMScheduler
        - PNDMScheduler
        - LMSDiscreteScheduler
        - EulerDiscreteScheduler
        - EulerAncestralDiscreteScheduler
        - DPMSolverMultistepScheduler
        - HeunDiscreteScheduler
        - KDPM2DiscreteScheduler
        - DPMSolverSinglestepScheduler
        - KDPM2AncestralDiscreteScheduler
        - UniPCMultistepScheduler
        - DDIMInverseScheduler
        - DEISMultistepScheduler
        - IPNDMScheduler
        - KarrasVeScheduler
        - ScoreSdeVeScheduler
        - LCMScheduler
      description: Available schedulers for image generation.
  responses:
    StandardErrorResponse:
      description: >-
        Bad request (invalid parameters), unauthorized (invalid API key), or
        internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImageGenerationErrorResponse'

````