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

# Upscale(업스케일 - 편집)



## OpenAPI

````yaml https://beta.flamel.app/api-json post /api/images/{id}/upsize
openapi: 3.0.0
info:
  title: Flamel API 문서
  description: REST API 문서입니다. 발급받은 API키를 X-Api-Key 헤더에 넣은 뒤 api를 사용하면 됩니다.
  version: '1.1'
  contact: {}
servers:
  - url: http://localhost:4010
    description: Local
  - url: https://beta.flamel.app
    description: Beta
security: []
tags:
  - name: Flamel
    description: ''
paths:
  /api/images/{id}/upsize:
    post:
      tags:
        - images
      summary: Upscale(업스케일 - 편집)
      operationId: ImagesApiController_upsize
      parameters:
        - name: id
          required: true
          in: path
          description: Image ID(이미지 ID)
          schema:
            type: number
        - name: X-Request-Id
          required: false
          in: header
          description: Request Id for canceling edit request(취소 요청을 위한 요청 ID)
          schema:
            type: string
        - name: X-Platform
          in: header
          description: 플랫폼 구분 (web, app, figma)
          required: false
          schema:
            type: string
            enum:
              - web
              - app
              - figma
              - api
            default: web
      responses:
        '201':
          description: Upscaled Image(업스케일된 이미지)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                InvalidApiKey:
                  summary: Invalid API KEY(API KEY 틀림)
                  value:
                    success: false
                    code: 401
                    data: wrong_api_key
                ApiKeyExpired:
                  summary: API KEY Expired(API KEY 만료)
                  value:
                    success: false
                    code: 401
                    data: api_key_expired
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                NotLoggedIn:
                  summary: Not Logged In(로그인되어있지 않음)
                  value:
                    success: false
                    code: 403
                    data: not_logged_in
                FreeUserFourKNotAvailable:
                  summary: Free User Cannot Use 4K(무료 유저는 4K 이용불가)
                  value:
                    success: false
                    code: 403
                    data: free_user_cannot_use_4k
                CannotUpscaleUpscaled:
                  summary: >-
                    Cannot Upscale Already Upscaled Image(이미 업스케일 된 이미지를 업스케일할 수
                    없음)
                  value:
                    success: false
                    code: 403
                    data: cannot_upscale_already_upscaled_image
                PremiumCollectionForbidden:
                  summary: Premium Collection Not Available(프리미엄컬렉션사용불가)
                  value:
                    success: false
                    code: 403
                    data: premium_collection(:imageId)
                FailedBilling:
                  summary: Failed Billing(결제 실패자)
                  value:
                    success: false
                    code: 403
                    data: failed_billing
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                NoInputImage:
                  summary: No Image Found(해당 이미지 없음)
                  value:
                    success: false
                    code: 404
                    data: no_input_image (:imageId)
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                UserCanceledRequest:
                  summary: User Canceled Request(사용자가 요청을 취소했음)
                  value:
                    success: false
                    code: 409
                    data: user_canceled_request
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                NoCreditCostInfo:
                  summary: Credit Cost Table Missing(크레딧소모량테이블누락)
                  value:
                    success: false
                    code: 422
                    data: no_credit_cost_info_at_admin
                NoModel:
                  summary: Dedicated Model Missing in Admin(어드민에 전용모델 누락)
                  value:
                    success: false
                    code: 422
                    data: no_model_exception (:model)
                UnknownModel:
                  summary: Unrecognized Model Type(인식할 수 없는 모델 유형)
                  value:
                    success: false
                    code: 422
                    data: unknown_model (:model)
      security:
        - apiKey: []
components:
  schemas:
    EditResponseDto:
      type: object
      properties:
        image:
          description: Upscaled Image(업스케일된 이미지)
          allOf:
            - $ref: '#/components/schemas/EditImageDto'
      required:
        - image
    EditImageDto:
      type: object
      properties:
        imageId:
          type: number
          description: ID(아이디)
        resolution:
          type: string
          pattern: /\d{3,4}x\d{3,4}/
          description: Resolution(해상도)
          example: 512x512
        scaleSize:
          type: object
          pattern: /\dx/
          description: Scale(스케일)
          example: 2x 또는 4x 또는 8x(1x는 원본 이미지)
        ownerId:
          type: number
          description: Owner ID(소유자 아이디)
        EditInfo:
          description: Edit Information(편집 정보)
          allOf:
            - $ref: '#/components/schemas/PickTypeClass'
      required:
        - imageId
        - resolution
        - scaleSize
        - ownerId
        - EditInfo
    PickTypeClass:
      type: object
      properties:
        originalPrompt:
          type: string
          description: Original Prompt(원본 프롬프트)
        super:
          type: string
          description: Super Category Code(대분류코드)
        main:
          type: string
          description: Main Category Code(중분류코드)
        variationId:
          type: number
          description: Variation Original ID(배리에이션 원본 아이디)
        groupId:
          type: string
          description: Group ID(그룹아이디)
        blurReason:
          type: string
          description: Blur Image Status(블러이미지 여부(블러이미지면 버튼 표시하면 안 됨))
      required:
        - originalPrompt
        - super
        - main
        - variationId
        - groupId
        - blurReason
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````