openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/ai-photo-avatar-style-generator
info:
  title: Versatile Photo & Avatar Style Generator API (PhotoMaker)
  description: Create personalized photos, avatars, and paintings in any style
    within seconds using high-speed, stylization AI from
    tencentarc/photomaker-style.
  version: 467d062309da518648ba89d226490e02b8ed09b5abc15026e54e31c5a8cd0769
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:
        disable_safety_checker:
          default: false
          description: Disable safety checker for generated images.
          title: Disable Safety Checker
          type: boolean
          x-order: 12
          example: true
        guidance_scale:
          default: 5
          description: Guidance scale. A guidance scale of 1 corresponds to doing no
            classifier free guidance.
          maximum: 10
          minimum: 1
          title: Guidance Scale
          type: number
          x-order: 10
          example: 5
        input_image:
          description: The input image, for example a photo of your face.
          format: uri
          title: Input Image
          type: string
          x-order: 0
          example: https://replicate.delivery/pbxt/KFRveCbE71qFTQGSF509CXYC16qB1bcZmAWq8O172ael04Ga/lenna.jpg
        input_image2:
          description: Additional input image (optional)
          format: uri
          title: Input Image2
          type: string
          x-order: 1
          example: https://example.com/image.jpg
        input_image3:
          description: Additional input image (optional)
          format: uri
          title: Input Image3
          type: string
          x-order: 2
          example: https://example.com/image.jpg
        input_image4:
          description: Additional input image (optional)
          format: uri
          title: Input Image4
          type: string
          x-order: 3
          example: https://example.com/image.jpg
        negative_prompt:
          default: nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers,
            extra digit, fewer digits, cropped, worst quality, low quality,
            normal quality, jpeg artifacts, signature, watermark, username,
            blurry
          description: Negative Prompt. The negative prompt should NOT contain the trigger
            word.
          title: Negative Prompt
          type: string
          x-order: 6
          example: realistic, photo-realistic, worst quality, greyscale, bad anatomy, bad
            hands, error, text
        num_outputs:
          default: 1
          description: Number of output images
          maximum: 4
          minimum: 1
          title: Num Outputs
          type: integer
          x-order: 9
          example: 2
        num_steps:
          default: 20
          description: Number of sample steps
          maximum: 100
          minimum: 1
          title: Num Steps
          type: integer
          x-order: 7
          example: 50
        prompt:
          default: A photo of a person img
          description: "Prompt. Example: 'a photo of a man/woman img'. The phrase 'img' is
            the trigger word."
          title: Prompt
          type: string
          x-order: 4
          example: A girl img riding dragon over a whimsical castle, 3d CGI, art by Pixar,
            half-body, screenshot from animation
        seed:
          description: Seed. Leave blank to use a random number
          maximum: 2147483647
          minimum: 0
          title: Seed
          type: integer
          x-order: 11
          example: 1073741823
        style_name:
          default: (No style)
          description: Style template. The style template will add a style-specific prompt
            and negative prompt to the user's prompt.
          enum:
            - (No style)
            - Cinematic
            - Disney Charactor
            - Digital Art
            - Photographic (Default)
            - Fantasy art
            - Neonpunk
            - Enhance
            - Comic book
            - Lowpoly
            - Line art
          title: style_name
          type: string
          x-order: 5
          example: (No style)
        style_strength_ratio:
          default: 20
          description: Style strength (%)
          maximum: 50
          minimum: 15
          title: Style Strength Ratio
          type: number
          x-order: 8
          example: 35
      required:
        - input_image
      title: Input
      type: object
    Output:
      items:
        format: uri
        type: string
      title: Output
      type: array
    PredictionRequest:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        input:
          properties:
            disable_safety_checker:
              default: false
              description: Disable safety checker for generated images.
              title: Disable Safety Checker
              type: boolean
              x-order: 12
            guidance_scale:
              default: 5
              description: Guidance scale. A guidance scale of 1 corresponds to doing no
                classifier free guidance.
              maximum: 10
              minimum: 1
              title: Guidance Scale
              type: number
              x-order: 10
            input_image:
              description: The input image, for example a photo of your face.
              format: uri
              title: Input Image
              type: string
              x-order: 0
            input_image2:
              description: Additional input image (optional)
              format: uri
              title: Input Image2
              type: string
              x-order: 1
            input_image3:
              description: Additional input image (optional)
              format: uri
              title: Input Image3
              type: string
              x-order: 2
            input_image4:
              description: Additional input image (optional)
              format: uri
              title: Input Image4
              type: string
              x-order: 3
            negative_prompt:
              default: nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers,
                extra digit, fewer digits, cropped, worst quality, low quality,
                normal quality, jpeg artifacts, signature, watermark, username,
                blurry
              description: Negative Prompt. The negative prompt should NOT contain the trigger
                word.
              title: Negative Prompt
              type: string
              x-order: 6
            num_outputs:
              default: 1
              description: Number of output images
              maximum: 4
              minimum: 1
              title: Num Outputs
              type: integer
              x-order: 9
            num_steps:
              default: 20
              description: Number of sample steps
              maximum: 100
              minimum: 1
              title: Num Steps
              type: integer
              x-order: 7
            prompt:
              default: A photo of a person img
              description: "Prompt. Example: 'a photo of a man/woman img'. The phrase 'img' is
                the trigger word."
              title: Prompt
              type: string
              x-order: 4
            seed:
              description: Seed. Leave blank to use a random number
              maximum: 2147483647
              minimum: 0
              title: Seed
              type: integer
              x-order: 11
            style_name:
              default: (No style)
              description: Style template. The style template will add a style-specific prompt
                and negative prompt to the user's prompt.
              enum:
                - (No style)
                - Cinematic
                - Disney Charactor
                - Digital Art
                - Photographic (Default)
                - Fantasy art
                - Neonpunk
                - Enhance
                - Comic book
                - Lowpoly
                - Line art
              title: style_name
              type: string
              x-order: 5
            style_strength_ratio:
              default: 20
              description: Style strength (%)
              maximum: 50
              minimum: 15
              title: Style Strength Ratio
              type: number
              x-order: 8
          required:
            - input_image
          title: Input
          type: object
        output_file_prefix:
          title: Output File Prefix
          type: string
        webhook:
          format: uri
          maxLength: 65536
          minLength: 1
          title: Webhook
          type: string
        webhook_events_filter:
          default:
            - start
            - output
            - logs
            - completed
          items:
            description: An enumeration.
            enum:
              - start
              - output
              - logs
              - completed
            title: WebhookEvent
            type: string
          type: array
      title: PredictionRequest
      type: object
    PredictionResponse:
      properties:
        completed_at:
          format: date-time
          title: Completed At
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        error:
          title: Error
          type: string
        id:
          title: Id
          type: string
        input:
          properties:
            disable_safety_checker:
              default: false
              description: Disable safety checker for generated images.
              title: Disable Safety Checker
              type: boolean
              x-order: 12
            guidance_scale:
              default: 5
              description: Guidance scale. A guidance scale of 1 corresponds to doing no
                classifier free guidance.
              maximum: 10
              minimum: 1
              title: Guidance Scale
              type: number
              x-order: 10
            input_image:
              description: The input image, for example a photo of your face.
              format: uri
              title: Input Image
              type: string
              x-order: 0
            input_image2:
              description: Additional input image (optional)
              format: uri
              title: Input Image2
              type: string
              x-order: 1
            input_image3:
              description: Additional input image (optional)
              format: uri
              title: Input Image3
              type: string
              x-order: 2
            input_image4:
              description: Additional input image (optional)
              format: uri
              title: Input Image4
              type: string
              x-order: 3
            negative_prompt:
              default: nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers,
                extra digit, fewer digits, cropped, worst quality, low quality,
                normal quality, jpeg artifacts, signature, watermark, username,
                blurry
              description: Negative Prompt. The negative prompt should NOT contain the trigger
                word.
              title: Negative Prompt
              type: string
              x-order: 6
            num_outputs:
              default: 1
              description: Number of output images
              maximum: 4
              minimum: 1
              title: Num Outputs
              type: integer
              x-order: 9
            num_steps:
              default: 20
              description: Number of sample steps
              maximum: 100
              minimum: 1
              title: Num Steps
              type: integer
              x-order: 7
            prompt:
              default: A photo of a person img
              description: "Prompt. Example: 'a photo of a man/woman img'. The phrase 'img' is
                the trigger word."
              title: Prompt
              type: string
              x-order: 4
            seed:
              description: Seed. Leave blank to use a random number
              maximum: 2147483647
              minimum: 0
              title: Seed
              type: integer
              x-order: 11
            style_name:
              default: (No style)
              description: Style template. The style template will add a style-specific prompt
                and negative prompt to the user's prompt.
              enum:
                - (No style)
                - Cinematic
                - Disney Charactor
                - Digital Art
                - Photographic (Default)
                - Fantasy art
                - Neonpunk
                - Enhance
                - Comic book
                - Lowpoly
                - Line art
              title: style_name
              type: string
              x-order: 5
            style_strength_ratio:
              default: 20
              description: Style strength (%)
              maximum: 50
              minimum: 15
              title: Style Strength Ratio
              type: number
              x-order: 8
          required:
            - input_image
          title: Input
          type: object
        logs:
          default: ""
          title: Logs
          type: string
        metrics:
          title: Metrics
          type: object
        output:
          items:
            format: uri
            type: string
          title: Output
          type: array
        started_at:
          format: date-time
          title: Started At
          type: string
        status:
          description: An enumeration.
          enum:
            - starting
            - processing
            - succeeded
            - canceled
            - failed
          title: Status
          type: string
        version:
          title: Version
          type: string
      title: PredictionResponse
      type: object
    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
    WebhookEvent:
      description: An enumeration.
      enum:
        - start
        - output
        - logs
        - completed
      title: WebhookEvent
      type: string
    style_name:
      description: An enumeration.
      enum:
        - (No style)
        - Cinematic
        - Disney Charactor
        - Digital Art
        - Photographic (Default)
        - Fantasy art
        - Neonpunk
        - Enhance
        - Comic book
        - Lowpoly
        - Line art
      title: style_name
      type: string
  securitySchemes: {}
security: {}
paths:
  /predictions:
    post:
      summary: Create a prediction with tencentarc/photomaker-style
      description: Run inference with the tencentarc/photomaker-style model on API.market
      operationId: createPhotomaker_stylePrediction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - version
                - input
              properties:
                version:
                  type: string
                  description: Model version ID
                  default: 467d062309da518648ba89d226490e02b8ed09b5abc15026e54e31c5a8cd0769
                input:
                  $ref: "#/components/schemas/Input"
            examples:
              default:
                summary: Default example
                value:
                  version: 467d062309da518648ba89d226490e02b8ed09b5abc15026e54e31c5a8cd0769
                  input:
                    prompt: A girl img riding dragon over a whimsical castle, 3d CGI, art by Pixar,
                      half-body, screenshot from animation
                    num_steps: 50
                    style_name: (No style)
                    input_image: https://replicate.delivery/pbxt/KFRveCbE71qFTQGSF509CXYC16qB1bcZmAWq8O172ael04Ga/lenna.jpg
                    num_outputs: 2
                    guidance_scale: 5
                    negative_prompt: realistic, photo-realistic, worst quality, greyscale, bad
                      anatomy, bad hands, error, text
                    style_strength_ratio: 35
      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: 467d062309da518648ba89d226490e02b8ed09b5abc15026e54e31c5a8cd0769
                    status: starting
                    created_at: 2025-04-24T18:42:18.517Z
        "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 tencentarc/photomaker-style
        prediction from API.market
      operationId: getPhotomaker_stylePrediction
      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://replicate.delivery/pbxt/WwkQofrF9CQuJ6v3slDfyha3YB1teWJpnWLBsVSdvfeFh2tRC/image_0.png
                      - https://replicate.delivery/pbxt/0eNDe5B73njlkkSJfJeZ4Riiww3OYci679bnbaf0cNzLh2tRC/image_1.png
                    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: artificial-intelligence
    description: Operations related to artificial-intelligence
  - name: image
    description: Operations related to image
  - name: entertainment
    description: Operations related to entertainment
  - name: app-enabled
    description: Operations related to app-enabled
  - name: image-to-image
    description: Operations related to image-to-image
