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

# Modify 1 image

> Partially update certain fields of an existing image by its ID.



## OpenAPI

````yaml https://api.wesog.com/openapi.json patch /imgs/{image_id}
openapi: 3.1.0
info:
  title: Wesog API
  description: Wesog AI services for media providers
  version: 1.0.0
servers:
  - url: https://api.wesog.com
    description: Production server
  - url: https://v2.api.wesog.com
    description: Production server (v2)
security: []
paths:
  /imgs/{image_id}:
    patch:
      tags:
        - Images
      summary: Modify 1 image
      description: Partially update certain fields of an existing image by its ID.
      operationId: patch_1_imgs__image_id__patch
      parameters:
        - name: wait
          in: query
          required: false
          schema:
            type: boolean
            description: Wait for completion?
            default: false
            title: Wait
          description: Wait for completion?
        - name: urgent
          in: query
          required: false
          schema:
            type: boolean
            description: Enqueue at head of queue if True
            default: false
            title: Urgent
          description: Enqueue at head of queue if True
        - name: strict
          in: query
          required: false
          schema:
            type: boolean
            description: Use strict mode if True
            default: false
            title: Strict
          description: Use strict mode if True
        - name: lang
          in: query
          required: false
          schema:
            type: string
            description: en|es|pt|fr|ru
            default: es
            title: Lang
          description: en|es|pt|fr|ru
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Update_1_image'
      responses:
        '200':
          description: image successfully modified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation_Out'
        '202':
          description: image modification accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingOperation'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Update_1_image:
      properties:
        src:
          anyOf:
            - type: string
            - type: 'null'
          title: Src
          description: >-
            Url of the image in high or medium resolution (used as source for
            the AI). Alternative to `src_path`; provide exactly one of the two.
          example: https://cdn.example.com/image/source.jpg
        src_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Src Path
          description: >-
            Local filesystem path of the image (used as source for the AI).
            Alternative to `src`; provide exactly one of the two.
          example: /data/images/source.jpg
        url_img_watermark:
          anyOf:
            - type: string
            - type: 'null'
          title: Url Img Watermark
          description: URL of the watermarked image.
          example: https://cdn.example.com/image/wm.jpg
        url_img_thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Url Img Thumbnail
          description: URL of the thumbnail image.
          example: https://cdn.example.com/image/thumb.jpg
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: A shorthand reference for the image.
          example: image123
        headline:
          anyOf:
            - type: string
            - type: 'null'
          title: Headline
          description: Short text describing the image.
          example: Sunset over the Hudson River
        caption:
          anyOf:
            - type: string
            - type: 'null'
          title: Caption
          description: Long text describing the image.
          example: >-
            A vibrant orange sunset reflecting on the river with the city
            skyline in silhouette.
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
          description: Text describing the visual appearance of an image (Accessibility).
        ai_generated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ai Generated
          description: Image generated by Artificial Intelligence.
        model_release:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Model Release
          description: image with model release.
        property_release:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Property Release
          description: image with property release.
        nsfw:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Nsfw
          description: Image Not Safe For Work.
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Current status of the image.
          example: Active
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: >-
            Date of the image creation in year-month-day format. Capture date
            for photographies.
          example: '2024-10-19'
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            A detailed description of the location, complementing the specified
            country and city with additional details such as street address or
            notable landmarks.
          example: 123 Main St, near Central Park
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: Name of the country.
          example: New York
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Name of the country.
          example: United States
        event:
          anyOf:
            - type: string
            - type: 'null'
          title: Event
          description: Related event
          example: Oscar awards 2024
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
          description: >-
            The name of the individual or entity responsible for creating the
            image, such as a photographer or painter.
          example: Jane Doe
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: >-
            The identifier of the provider, which can be either a unique numeric
            ID or a descriptive name.
          example: Acme Inc.
        shot:
          anyOf:
            - type: string
            - type: 'null'
          title: Shot
          description: Type of photography shot.
          example: Portrait
        scene:
          anyOf:
            - type: string
            - type: 'null'
          title: Scene
          description: Spot, place, visual location
          example: Town square
        technique:
          anyOf:
            - type: string
            - type: 'null'
          title: Technique
          description: >-
            The specific method or process used in creating the artwork,
            reflecting the artist's unique approach or the traditional methods
            tied to certain mediums.
          example: Drawing
        medium:
          anyOf:
            - type: string
            - type: 'null'
          title: Medium
          description: >-
            The material or substance used in the creation of the artwork or
            object. This field corresponds to various artistic mediums like
            oils, acrylics, or digital formats.
          example: Oil on canvas
        keywords:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Keywords
          description: Specific tags describing the image
          example:
            - Tree
            - Dog
            - Ball
            - Water
        categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Categories
          description: General categories of the image
          example:
            - Sport
            - Fashion
            - Politics
        collections:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Collections
          description: Collections that the image belongs to
          example:
            - Steet pics
            - Exclusive
      type: object
      title: Update_1_image
    Operation_Out:
      properties:
        method:
          $ref: '#/components/schemas/OpMethod'
          description: Operation type based on the HTTP method.
        resource:
          $ref: '#/components/schemas/OpResource'
          description: Resource type involved in the operation.
        num_total:
          type: integer
          title: Num Total
          description: Total of elements.
        num_good:
          type: integer
          title: Num Good
          description: Number of correctly processed elements.
        num_bad:
          type: integer
          title: Num Bad
          description: Number of failed processed elements.
        is_started:
          type: boolean
          title: Is Started
          description: Boolean indicating if the operation has started.
        is_finished:
          type: boolean
          title: Is Finished
          description: Boolean indicating if the operations has finished.
        all_good:
          anyOf:
            - type: boolean
            - type: 'null'
          title: All Good
          description: Boolean indicating that there is no failed elements yet.
        do_wait:
          type: boolean
          title: Do Wait
          description: Boolean for know if have to wait or not.
        do_urgent:
          type: boolean
          title: Do Urgent
          description: Boolean for know if it is an urgent operation.
        do_strict:
          type: boolean
          title: Do Strict
          description: Boolean for know if is required strict operations over DB.
        idle_ms:
          type: number
          title: Idle Ms
          description: >-
            Duration (milliseconds) between the operation has been created and
            has started.
        exec_ms:
          type: number
          title: Exec Ms
          description: >-
            Duration (milliseconds) between the operation has been started and
            has finished.
        created_at:
          type: string
          title: Created At
          description: Creation datetime.
        started_at:
          type: string
          title: Started At
          description: Start datetime.
        finished_at:
          type: string
          title: Finished At
          description: Finalization datetime.
        errors:
          items:
            $ref: '#/components/schemas/OpError'
          type: array
          title: Errors
          description: List of errors that occurred during processing the operation.
      type: object
      required:
        - method
        - resource
        - num_total
        - num_good
        - num_bad
        - is_started
        - is_finished
        - all_good
        - do_wait
        - do_urgent
        - do_strict
        - idle_ms
        - exec_ms
        - created_at
        - started_at
        - finished_at
        - errors
      title: Operation_Out
      description: |-
        Output of:
        - a synchronous (blocking) operation. POST /imgs?wait=true
        - operation status.                   GET ops/<op_id>
    PendingOperation:
      properties:
        operation_id:
          type: integer
          title: Operation Id
          description: ID assigned to the operation, or -1 if enqueuing failed
        n_total:
          type: integer
          title: N Total
          description: Total number of items attempted to enqueue
        msg:
          type: string
          title: Msg
          description: Status message (e.g., 'Operation enqueued successfully')
      type: object
      required:
        - operation_id
        - n_total
        - msg
      title: PendingOperation
      description: |-
        Immediate output of an asynchronous (queued) operation.

        Processing takes place in the background; `operation_id = -1`
        indicates that the job could not be enqueued.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OpMethod:
      type: string
      enum:
        - add
        - upd
        - del
        - multiple
      title: OpMethod
      description: Tipo de respuesta asociada a una operación con imágenes.
    OpResource:
      type: string
      enum:
        - video
        - image
        - celebs
      title: OpResource
    OpError:
      properties:
        id:
          type: integer
          title: Id
          description: Identifier of the resource that triggered the error.
        msg:
          type: string
          title: Msg
          description: Human-readable description of the error returned by the system.
      type: object
      required:
        - id
        - msg
      title: OpError
      description: Details of an error produced during the operation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: API-Key

````