# Inpainting

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/nova/button:
    post:
      summary: Inpainting
      deprecated: false
      description: >-
        After a successful upscale (U1, U2, U3, U4). You have the option to use
        the Vary (Region) button to redraw a section of your image; also known
        as Inpainting.


        You can use [this tool](https://mask.imaginepro.ai/) to generate the
        mask and retrieve its base64 encoded string. 


        If you are making mask by yourself, please make sure it **uses
        background in black, and white color for selected zone**.
      tags:
        - API Documentation
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ref:
                  type: string
                  description: >-
                    The reference metadata which will return as part of the
                    webhook.
                webhookOverride:
                  type: string
                  description: >-
                    The webhook URL which the response will send to, the payload
                    of this webhook is same as our Message endpoint.
                messageId:
                  type: string
                  description: The unique identify from your previous upscale request.
                button:
                  type: string
                  description: The button action.
                  default: Vary (Region)
                  examples:
                    - Vary (Region)
                  const: Vary (Region)
                mask:
                  type: string
                  description: >-
                    The mask is a base64 encoded string of the region you want
                    to inpaint.
                prompt:
                  type: string
                  description: >-
                    You can optionally pass prompt in your command - which can
                    be used useful for the inpainting area.
              x-apifox-orders:
                - messageId
                - button
                - mask
                - prompt
                - ref
                - webhookOverride
              required:
                - messageId
                - button
                - mask
            example:
              messageId: e57fb09d-25f0-49f7-8f0f-2e902ffe9fdd
              mask: >-
                UklGRiQAAABXRUJQVlA4WAoAAAAQABAJAAABKAAATAwAAABAAEAAAAAAABIAAAAAQAAAEgAAA...
              prompt: A little cat running on the grass
              button: Vary (Region)
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: The status of the request.
                  messageId:
                    type: string
                    description: >-
                      The messageId of the request, which will be used for
                      querying the progress, sending subsequential actions
                      later, etc.
                  createdAt:
                    type: string
                    description: The timestamp of the job creation.
                  error:
                    type: string
                    description: The error message, if any
                x-apifox-orders:
                  - success
                  - messageId
                  - createdAt
                  - error
                required:
                  - success
                  - messageId
                  - createdAt
              example:
                success: true
                messageId: d15c1541-229a-442b-9873-d3494dede12a
                createdAt: '2023-08-01T14:03:01.817Z'
          headers: {}
          x-apifox-name: Success
      security:
        - bearer: []
      x-apifox-folder: API Documentation
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5160896/apis/api-215991738-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.imaginepro.ai
    description: Prod Env
security: []

```
