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

# Upscale

> Upscale an image by increasing its resolution.

<Info>
  The default Gateway used in this guide is the public
  [Livepeer.cloud](https://www.livepeer.cloud/) Gateway. It is free to use but
  not intended for production-ready applications. For production-ready
  applications, consider using the [Livepeer Studio](https://livepeer.studio/)
  Gateway, which requires an API token. Alternatively, you can set up your own
  Gateway node or partner with one via the `ai-video` channel on
  [Discord](https://discord.gg/livepeer).
</Info>

<Note>
  Please note that the exact parameters, default values, and responses may vary
  between models. For more information on model-specific parameters, please
  refer to the respective model documentation available in the [upscaling
  pipeline](/ai/pipelines/upscale). Not all parameters might be available for a
  given model.
</Note>


## OpenAPI

````yaml post /upscale
openapi: 3.1.0
info:
  title: Livepeer AI Runner
  description: An application to run AI pipelines
  version: 0.0.0
servers:
  - url: https://dream-gateway.livepeer.cloud
    description: Livepeer Cloud Community Gateway
  - url: https://livepeer.studio/api/beta/generate
    description: Livepeer Studio Gateway
security: []
paths:
  /upscale:
    post:
      tags:
        - generate
      summary: Upscale
      description: Upscale an image by increasing its resolution.
      operationId: genUpscale
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_genUpscale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
                x-speakeasy-name-override: data
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_genUpscale:
      properties:
        prompt:
          type: string
          title: Prompt
          description: Text prompt(s) to guide upscaled image generation.
        image:
          type: string
          format: binary
          title: Image
          description: Uploaded image to modify with the pipeline.
        model_id:
          type: string
          title: Model Id
          description: Hugging Face model ID used for upscaled image generation.
          default: ''
        safety_check:
          type: boolean
          title: Safety Check
          description: >-
            Perform a safety check to estimate if generated images could be
            offensive or harmful.
          default: true
        seed:
          type: integer
          title: Seed
          description: Seed for random number generation.
        num_inference_steps:
          type: integer
          title: Num Inference Steps
          description: >-
            Number of denoising steps. More steps usually lead to higher quality
            images but slower inference. Modulated by strength.
          default: 75
      type: object
      required:
        - prompt
        - image
      title: Body_genUpscale
    ImageResponse:
      properties:
        images:
          items:
            $ref: '#/components/schemas/Media'
          type: array
          title: Images
          description: The generated images.
      type: object
      required:
        - images
      title: ImageResponse
      description: Response model for image generation.
    HTTPError:
      properties:
        detail:
          allOf:
            - $ref: '#/components/schemas/APIError'
          description: Detailed error information.
      type: object
      required:
        - detail
      title: HTTPError
      description: HTTP error response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Media:
      properties:
        url:
          type: string
          title: Url
          description: The URL where the media can be accessed.
        seed:
          type: integer
          title: Seed
          description: The seed used to generate the media.
        nsfw:
          type: boolean
          title: Nsfw
          description: Whether the media was flagged as NSFW.
      type: object
      required:
        - url
        - seed
        - nsfw
      title: Media
      description: A media object containing information about the generated media.
    APIError:
      properties:
        msg:
          type: string
          title: Msg
          description: The error message.
      type: object
      required:
        - msg
      title: APIError
      description: API error response model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````