> ## 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.

# Create 1 image

> Create a image by its ID.



## OpenAPI

````yaml https://api.wesog.com/openapi.json post /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}:
    post:
      tags:
        - Images
      summary: Create 1 image
      description: Create a image by its ID.
      operationId: post_1_imgs__image_id__post
      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/Create_1_image'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '201':
          description: image successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation_Out'
        '202':
          description: image creation 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:
    Create_1_image:
      properties:
        src:
          anyOf:
            - type: string
            - type: 'null'
          title: Src
        src_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Src Path
        url_img_watermark:
          anyOf:
            - type: string
            - type: 'null'
          title: Url Img Watermark
        url_img_thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Url Img Thumbnail
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        headline:
          anyOf:
            - type: string
            - type: 'null'
          title: Headline
        caption:
          anyOf:
            - type: string
            - type: 'null'
          title: Caption
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
        ai_generated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ai Generated
        model_release:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Model Release
        property_release:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Property Release
        nsfw:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Nsfw
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        event:
          anyOf:
            - type: string
            - type: 'null'
          title: Event
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        shot:
          anyOf:
            - type: string
            - type: 'null'
          title: Shot
        scene:
          anyOf:
            - type: string
            - type: 'null'
          title: Scene
        technique:
          anyOf:
            - type: string
            - type: 'null'
          title: Technique
        medium:
          anyOf:
            - type: string
            - type: 'null'
          title: Medium
        keywords:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Keywords
        categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Categories
        collections:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Collections
      type: object
      title: Create_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

````