openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/face-to-creative-styles-generator
info:
  title: Face-to-Style Image Generator API (fofr/face-to-many)
  description: Transform any portrait into 3D, emoji, pixel art, and more in
    secondsunleash creative faces for games, apps, or media with rapid,
    high-quality results.
  version: a07f252abbbd832009640b27f063ea52d87d7a23a185ca165bec23b5adc8deaf
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:
        control_depth_strength:
          default: 0.8
          description: Strength of depth controlnet. The bigger this is, the more
            controlnet affects the output.
          maximum: 1
          minimum: 0
          title: Control Depth Strength
          type: number
          x-order: 6
          example: 0.8
        custom_lora_url:
          description: URL to a Replicate custom LoRA. Must be in the format
            https://replicate.delivery/pbxt/[id]/trained_model.tar or
            https://pbxt.replicate.delivery/[id]/trained_model.tar
          title: Custom Lora Url
          type: string
          x-order: 9
          example: https://example.com/image.jpg
        denoising_strength:
          default: 0.65
          description: How much of the original image to keep. 1 is the complete
            destruction of the original image, 0 is the original image
          maximum: 1
          minimum: 0
          title: Denoising Strength
          type: number
          x-order: 4
          example: 0.65
        image:
          description: An image of a person to be converted
          format: uri
          title: Image
          type: string
          x-order: 0
          example: https://replicate.delivery/pbxt/KW7Getr2zD5ECxySdBZtLmPa322lNkXrpkMdKcmxeaDmq2b1/MTk4MTczMTkzNzI1Mjg5NjYy.webp
        instant_id_strength:
          default: 1
          description: How strong the InstantID will be.
          maximum: 1
          minimum: 0
          title: Instant Id Strength
          type: number
          x-order: 7
          example: 0.8
        lora_scale:
          default: 1
          description: How strong the LoRA will be
          maximum: 1
          minimum: 0
          title: Lora Scale
          type: number
          x-order: 10
          example: 1
        negative_prompt:
          default: ""
          description: Things you do not want in the image
          title: Negative Prompt
          type: string
          x-order: 3
          example: ""
        prompt:
          default: a person
          title: Prompt
          type: string
          x-order: 2
          example: a person in a post apocalyptic war game
        prompt_strength:
          default: 4.5
          description: Strength of the prompt. This is the CFG scale, higher numbers lead
            to stronger prompt, lower numbers will keep more of a likeness to
            the original.
          maximum: 20
          minimum: 0
          title: Prompt Strength
          type: number
          x-order: 5
          example: 4.5
        seed:
          description: Fix the random seed for reproducibility
          title: Seed
          type: integer
          x-order: 8
          example: 1
        style:
          default: 3D
          description: Style to convert to
          enum:
            - 3D
            - Emoji
            - Video game
            - Pixels
            - Clay
            - Toy
          title: style
          type: string
          x-order: 1
          example: Clay
      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:
            control_depth_strength:
              default: 0.8
              description: Strength of depth controlnet. The bigger this is, the more
                controlnet affects the output.
              maximum: 1
              minimum: 0
              title: Control Depth Strength
              type: number
              x-order: 6
            custom_lora_url:
              description: URL to a Replicate custom LoRA. Must be in the format
                https://replicate.delivery/pbxt/[id]/trained_model.tar or
                https://pbxt.replicate.delivery/[id]/trained_model.tar
              title: Custom Lora Url
              type: string
              x-order: 9
            denoising_strength:
              default: 0.65
              description: How much of the original image to keep. 1 is the complete
                destruction of the original image, 0 is the original image
              maximum: 1
              minimum: 0
              title: Denoising Strength
              type: number
              x-order: 4
            image:
              description: An image of a person to be converted
              format: uri
              title: Image
              type: string
              x-order: 0
            instant_id_strength:
              default: 1
              description: How strong the InstantID will be.
              maximum: 1
              minimum: 0
              title: Instant Id Strength
              type: number
              x-order: 7
            lora_scale:
              default: 1
              description: How strong the LoRA will be
              maximum: 1
              minimum: 0
              title: Lora Scale
              type: number
              x-order: 10
            negative_prompt:
              default: ""
              description: Things you do not want in the image
              title: Negative Prompt
              type: string
              x-order: 3
            prompt:
              default: a person
              title: Prompt
              type: string
              x-order: 2
            prompt_strength:
              default: 4.5
              description: Strength of the prompt. This is the CFG scale, higher numbers lead
                to stronger prompt, lower numbers will keep more of a likeness
                to the original.
              maximum: 20
              minimum: 0
              title: Prompt Strength
              type: number
              x-order: 5
            seed:
              description: Fix the random seed for reproducibility
              title: Seed
              type: integer
              x-order: 8
            style:
              default: 3D
              description: Style to convert to
              enum:
                - 3D
                - Emoji
                - Video game
                - Pixels
                - Clay
                - Toy
              title: style
              type: string
              x-order: 1
          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:
            control_depth_strength:
              default: 0.8
              description: Strength of depth controlnet. The bigger this is, the more
                controlnet affects the output.
              maximum: 1
              minimum: 0
              title: Control Depth Strength
              type: number
              x-order: 6
            custom_lora_url:
              description: URL to a Replicate custom LoRA. Must be in the format
                https://replicate.delivery/pbxt/[id]/trained_model.tar or
                https://pbxt.replicate.delivery/[id]/trained_model.tar
              title: Custom Lora Url
              type: string
              x-order: 9
            denoising_strength:
              default: 0.65
              description: How much of the original image to keep. 1 is the complete
                destruction of the original image, 0 is the original image
              maximum: 1
              minimum: 0
              title: Denoising Strength
              type: number
              x-order: 4
            image:
              description: An image of a person to be converted
              format: uri
              title: Image
              type: string
              x-order: 0
            instant_id_strength:
              default: 1
              description: How strong the InstantID will be.
              maximum: 1
              minimum: 0
              title: Instant Id Strength
              type: number
              x-order: 7
            lora_scale:
              default: 1
              description: How strong the LoRA will be
              maximum: 1
              minimum: 0
              title: Lora Scale
              type: number
              x-order: 10
            negative_prompt:
              default: ""
              description: Things you do not want in the image
              title: Negative Prompt
              type: string
              x-order: 3
            prompt:
              default: a person
              title: Prompt
              type: string
              x-order: 2
            prompt_strength:
              default: 4.5
              description: Strength of the prompt. This is the CFG scale, higher numbers lead
                to stronger prompt, lower numbers will keep more of a likeness
                to the original.
              maximum: 20
              minimum: 0
              title: Prompt Strength
              type: number
              x-order: 5
            seed:
              description: Fix the random seed for reproducibility
              title: Seed
              type: integer
              x-order: 8
            style:
              default: 3D
              description: Style to convert to
              enum:
                - 3D
                - Emoji
                - Video game
                - Pixels
                - Clay
                - Toy
              title: style
              type: string
              x-order: 1
          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:
      description: An enumeration.
      enum:
        - 3D
        - Emoji
        - Video game
        - Pixels
        - Clay
        - Toy
      title: style
      type: string
  securitySchemes: {}
security: {}
paths:
  /predictions:
    post:
      summary: Create a prediction with fofr/face-to-many
      description: Run inference with the fofr/face-to-many model on API.market
      operationId: createFace_to_manyPrediction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - version
                - input
              properties:
                version:
                  type: string
                  description: Model version ID
                  default: a07f252abbbd832009640b27f063ea52d87d7a23a185ca165bec23b5adc8deaf
                input:
                  $ref: "#/components/schemas/Input"
            examples:
              default:
                summary: Default example
                value:
                  version: a07f252abbbd832009640b27f063ea52d87d7a23a185ca165bec23b5adc8deaf
                  input:
                    image: https://replicate.delivery/pbxt/KW7Getr2zD5ECxySdBZtLmPa322lNkXrpkMdKcmxeaDmq2b1/MTk4MTczMTkzNzI1Mjg5NjYy.webp
                    style: Clay
                    prompt: a person in a post apocalyptic war game
                    lora_scale: 1
                    negative_prompt: ""
                    prompt_strength: 4.5
                    denoising_strength: 0.65
                    instant_id_strength: 0.8
                    control_depth_strength: 0.8
      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: a07f252abbbd832009640b27f063ea52d87d7a23a185ca165bec23b5adc8deaf
                    status: starting
                    created_at: 2025-04-23T20:02:14.556Z
        "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 fofr/face-to-many prediction from
        API.market
      operationId: getFace_to_manyPrediction
      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/xezq/QYCNMyAE6C7fd6GXc5Uy9KfqYKVTUfKpuGePXSFf2qLCkBseE/ComfyUI_00001_.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: image-to-image
    description: Operations related to image-to-image
