openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/one-shot-portrait-generator-api
info:
  title: One-Shot Portrait Generator API (Faceshots) Instant, Lifelike Results
  description: Generate professional-quality, realistic portraits from a single
    image in seconds using advanced AI with Faceshots.
  version: 33bb74b80940e17f7907c9c3d42f586c674a81c32e46e92e3eb11f6629f752b5
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            properties:
              loc:
                items:
                  anyOf:
                    - type: string
                    - type: integer
                title: Location
                type: array
              msg:
                title: Message
                type: string
              type:
                title: Error Type
                type: string
            required:
              - loc
              - msg
              - type
            title: ValidationError
            type: object
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Input:
      properties:
        controlnet_conditioning_scale:
          default: 0.8
          description: Scale for ControlNet conditioning
          maximum: 1
          minimum: 0
          title: Controlnet Conditioning Scale
          type: number
          x-order: 6
          example: 0.5
        guidance_scale:
          default: 0
          description: Scale for classifier-free guidance. With LCM-LoRA, optimum is 0-5.
          maximum: 10
          minimum: 0
          title: Guidance Scale
          type: number
          x-order: 8
          example: 0
        height:
          default: 640
          description: Height of output image
          maximum: 2048
          minimum: 512
          title: Height
          type: integer
          x-order: 4
          example: 640
        image:
          description: Input image
          format: uri
          title: Image
          type: string
          x-order: 0
          example: https://cdn.api.market/3FiEdwrGnlc4kOYK-6UiA7_pq5FHBv_Y/-/pbxt/LrKm1cmtUKTLYvEQCuB240QIhinIUcVg2vEFbkM5VN56Z7OY/pexels-creation-hill-1681010.jpg
        ip_adapter_scale:
          default: 0.8
          description: Scale for IP adapter
          maximum: 1
          minimum: 0
          title: Ip Adapter Scale
          type: number
          x-order: 5
          example: 0.5
        negative_prompt:
          default: ""
          description: Input Negative Prompt
          title: Negative Prompt
          type: string
          x-order: 2
          example: ""
        num_inference_steps:
          default: 6
          description: Number of denoising steps. With LCM-LoRA, optimum is 6-8.
          maximum: 30
          minimum: 1
          title: Num Inference Steps
          type: integer
          x-order: 7
          example: 6
        prompt:
          default: Transform this casual photo of a person img into a professional-looking
            portrait suitable for LinkedIn. The individual should be dressed in
            business attire, with a confident and approachable expression. The
            background should be a simple, neutral color to emphasize the
            person. Ensure the lighting is soft and flattering, highlighting the
            person's features while maintaining a polished and formal
            appearance.
          description: Input prompt
          title: Prompt
          type: string
          x-order: 1
          example: Transform this casual photo of a person img into a professional-looking
            portrait.
        safety_checker:
          default: true
          description: Safety checker is enabled by default. Un-tick to expose unfiltered
            results.
          title: Safety Checker
          type: boolean
          x-order: 9
          example: true
        width:
          default: 640
          description: Width of output image
          maximum: 2048
          minimum: 512
          title: Width
          type: integer
          x-order: 3
          example: 640
      required:
        - image
      title: Input
      type: object
    Output:
      format: uri
      title: Output
      type: string
    Status:
      description: An enumeration.
      enum:
        - starting
        - processing
        - succeeded
        - canceled
        - failed
      title: Status
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes: {}
security: {}
paths:
  /predictions:
    post:
      summary: Create a prediction with editr-apps/faceshots
      description: Run inference with the editr-apps/faceshots model on API.market
      operationId: createFaceshotsPrediction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - version
                - input
              properties:
                version:
                  type: string
                  description: Model version ID
                  default: 33bb74b80940e17f7907c9c3d42f586c674a81c32e46e92e3eb11f6629f752b5
                input:
                  $ref: "#/components/schemas/Input"
            examples:
              default:
                summary: Default example
                value:
                  version: 33bb74b80940e17f7907c9c3d42f586c674a81c32e46e92e3eb11f6629f752b5
                  input:
                    image: https://cdn.api.market/3FiEdwrGnlc4kOYK-6UiA7_pq5FHBv_Y/-/pbxt/LrKm1cmtUKTLYvEQCuB240QIhinIUcVg2vEFbkM5VN56Z7OY/pexels-creation-hill-1681010.jpg
                    width: 640
                    height: 640
                    prompt: Transform this casual photo of a person img into a professional-looking
                      portrait.
                    guidance_scale: 0
                    safety_checker: true
                    negative_prompt: ""
                    ip_adapter_scale: 0.5
                    num_inference_steps: 6
                    controlnet_conditioning_scale: 0.5
      responses:
        "201":
          description: Prediction created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the prediction
                  version:
                    type: string
                    description: Model version used for the prediction
                  status:
                    type: string
                    enum:
                      - starting
                      - processing
                      - succeeded
                      - failed
                      - canceled
                    description: Current status of the prediction
                  created_at:
                    type: string
                    format: date-time
                    description: When the prediction was created
              examples:
                success:
                  summary: Successful prediction creation
                  value:
                    id: ufawqhfynnddngldkgtslldrkq
                    version: 33bb74b80940e17f7907c9c3d42f586c674a81c32e46e92e3eb11f6629f752b5
                    status: starting
                    created_at: 2025-05-21T18:15:56.294Z
        "400":
          description: Bad request, validation error
        "401":
          description: Unauthorized, invalid API token
    parameters:
      - &a1
        description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
  /predictions/{id}:
    get:
      summary: Get prediction status and results
      description: Get the status and results of a editr-apps/faceshots prediction
        from API.market
      operationId: getFaceshotsPrediction
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The prediction ID
      responses:
        "200":
          description: Prediction details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the prediction
                  status:
                    type: string
                    enum:
                      - starting
                      - processing
                      - succeeded
                      - failed
                      - canceled
                    description: Current status of the prediction
                  output:
                    $ref: "#/components/schemas/Output"
                  error:
                    type: string
                    description: Error message if the prediction failed
                  created_at:
                    type: string
                    format: date-time
                    description: When the prediction was created
                  started_at:
                    type: string
                    format: date-time
                    description: When the prediction started processing
                  completed_at:
                    type: string
                    format: date-time
                    description: When the prediction completed
              examples:
                succeeded:
                  summary: Successful prediction result
                  value:
                    id: ufawqhfynnddngldkgtslldrkq
                    status: succeeded
                    output: https://blog.api.market/wp-content/uploads/2026/10/docs-0fd7fdb2e937-output.jpg
                    created_at: 2023-01-01T12:00:00.000Z
                    started_at: 2023-01-01T12:00:05.000Z
                    completed_at: 2023-01-01T12:01:00.000Z
        "401":
          description: Unauthorized, invalid API token
        "404":
          description: Prediction not found
    parameters:
      - *a1
tags:
  - name: face-tools
    description: Operations related to face-tools
  - name: background-removal
    description: Operations related to background-removal
  - name: image-upscaling
    description: Operations related to image-upscaling
