openapi: 3.1.0
info:
  title: Images API
  version: 1.0.0
paths:
  /{space_id}/{asset_id}/{unique_id}/{name}:
    get:
      operationId: retrieveAnImage
      summary: Retrieve an image
      tags:
        - images
      parameters:
        - name: space_id
          in: path
          description: Alphanumeric id of the space to retrieve.
          required: true
          schema:
            type: string
        - name: asset_id
          in: path
          description: Alphanumeric id of the asset to which the image belongs.
          required: true
          schema:
            type: string
        - name: unique_id
          in: path
          description: Alphanumeric unique id identifying the image.
          required: true
          schema:
            type: string
        - name: name
          in: path
          description: The original file name of the image.
          required: true
          schema:
            type: string
        - name: w
          in: query
          description: The desired width of the image in pixels (cannot be zero).
          required: false
          schema:
            type: number
            format: double
        - name: h
          in: query
          description: The desired height of the image in pixels (cannot be zero).
          required: false
          schema:
            type: number
            format: double
        - name: fm
          in: query
          description: The desired image output format. The default is the original image format.
          required: false
          schema:
            $ref: '#/components/schemas/SpaceIdAssetIdUniqueIdNameGetParametersFm'
        - name: fl
          in: query
          description: >-
            For JPEG images, you can request a progressive JPEG. Should be used in conjunction with the fm parameter set
            to jpg. For PNG images, you can request a 8-bit PNG. Should be used in conjunction with the fm parameter set
            to png.
          required: false
          schema:
            $ref: '#/components/schemas/SpaceIdAssetIdUniqueIdNameGetParametersFl'
        - name: fit
          in: query
          description: >-
            By default, images are resized to fit into the specified dimensions, only if the original asset is larger
            than the specified limit (width and height). The image will take up the maximum space within the bounding
            box that was provided, at its original aspect ratio. You can request a different behavior using the fit
            parameter.
          required: false
          schema:
            $ref: '#/components/schemas/SpaceIdAssetIdUniqueIdNameGetParametersFit'
        - name: f
          in: query
          description: >-
            You can choose the focus area for resizing when using fit type pad, fill, crop or thumb. Focus area has no
            effect on the default or scale fit type. The default is center.
          required: false
          schema:
            $ref: '#/components/schemas/SpaceIdAssetIdUniqueIdNameGetParametersF'
        - name: r
          in: query
          description: |
            You can add rounded corners to your image or crop to a circle/ellipse. The default is 0.

            Possible values:
            - The size of the corner radius in pixels (e.g., "20")
            - "max" keyword for a full circle/ellipse
          required: false
          schema:
            type: string
        - name: q
          in: query
          description: Quality as a percentage, between 1 and 100.
          required: false
          schema:
            type: number
            format: double
        - name: color
          in: query
          description: A color constant.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK - Request successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Images_retrieveAnImage_Response_200'
servers:
  - url: https://images.ctfassets.net
    description: Images API server
components:
  schemas:
    SpaceIdAssetIdUniqueIdNameGetParametersFm:
      type: string
      enum:
        - jpg
        - png
        - webp
        - gif
        - avif
        - tiff
      title: SpaceIdAssetIdUniqueIdNameGetParametersFm
    SpaceIdAssetIdUniqueIdNameGetParametersFl:
      type: string
      enum:
        - progressive
        - png8
      title: SpaceIdAssetIdUniqueIdNameGetParametersFl
    SpaceIdAssetIdUniqueIdNameGetParametersFit:
      type: string
      enum:
        - pad
        - fill
        - scale
        - crop
        - thumb
      title: SpaceIdAssetIdUniqueIdNameGetParametersFit
    SpaceIdAssetIdUniqueIdNameGetParametersF:
      type: string
      enum:
        - center
        - top
        - right
        - left
        - bottom
        - top_right
        - top_left
        - bottom_right
        - bottom_left
        - face
        - faces
      title: SpaceIdAssetIdUniqueIdNameGetParametersF
    Images_retrieveAnImage_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Images_retrieveAnImage_Response_200
