> ## 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.

# Automatically Buy Lora Model

> Allows you to buy a Lora model automatically

## Request

Send a `POST` request to below endpoint and pass the **quantity** of the models you want to buy in the request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v3/dreambooth/buy_model' \
```

## Body

```json json theme={null}
{  
  "key": "your_api_key",  
  "quantity": ""
}
```


## OpenAPI

````yaml POST /dreambooth/buy_model
openapi: 3.1.0
info:
  title: ModelsLab General API
  description: >-
    General utility endpoints for ModelsLab API including subscription
    management, content moderation, and file handling
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api
    description: Main API server (for endpoints without version prefix)
  - url: https://modelslab.com/api/v3
    description: API v3 server
  - url: https://modelslab.com/api/v5
    description: API v5 server
  - url: https://modelslab.com/api/v6
    description: API v6 server
security: []
paths:
  /dreambooth/buy_model:
    post:
      summary: Buy Lora model
      description: This endpoint allows you to buy a Lora model automatically
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyModelRequest'
      responses:
        '200':
          description: Buy model response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyModelResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      servers:
        - url: https://modelslab.com/api/v3
components:
  schemas:
    BuyModelRequest:
      type: object
      required:
        - key
        - quantity
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        quantity:
          type: string
          description: The number of models you want to buy
    BuyModelResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        messege:
          type: string
          example: Payment was charged successfully
        purchased_models:
          type: integer
          description: Number of models purchased
        used_models:
          type: integer
          description: Number of models used
        available_models:
          type: integer
          description: Number of available models
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message

````