openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/proteus
info:
  title: "ProteusV0.2: Text-to-image for Enhanced Anime and Significant Rendering"
  description: Achieve superior image generation with subtle improvements and
    prompt responsiveness, backed by innovative LORA model integration
  version: 1.0.5
paths:
  /image/run:
    post:
      summary: Run image generation
      description: Runs an image generation process with the given input parameters.
      operationId: runImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: object
                  properties:
                    width:
                      type: integer
                      description: Width of the generated image.
                      example: 1024
                    height:
                      type: integer
                      description: Height of the generated image.
                      example: 1024
                    prompt:
                      type: string
                      description: Text prompt for the image.
                      example: "cinematic film still of Kodak Motion Picture Film: (Sharp Detailed
                        Image) An Oscar winning movie for Best Cinematography a
                        woman in a kimono standing on a subway train in Japan
                        Kodak Motion Picture Film Style, shallow depth of field,
                        vignette, highly detailed, high budget, bokeh,
                        cinemascope, moody, epic, gorgeous, film grain, grainy"
                    scheduler:
                      type: string
                      description: The scheduler to use for image generation.
                      example: KarrasDPM
                    num_outputs:
                      type: integer
                      description: Number of images to generate.
                      example: 1
                    guidance_scale:
                      type: number
                      format: float
                      description: Controls how much the image should adhere to the prompt.
                      example: 7.5
                    apply_watermark:
                      type: boolean
                      description: Whether to apply a watermark to the image.
                      example: true
                    negative_prompt:
                      type: string
                      description: Text for the negative prompt to avoid undesirable qualities.
                      example: worst quality, low quality
                    prompt_strength:
                      type: number
                      format: float
                      description: Strength of the prompt influence.
                      example: 0.8
                    num_inference_steps:
                      type: integer
                      description: Number of inference steps.
                      example: 20
              required:
                - input
      responses:
        "200":
          description: Successful image generation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The current status of the image generation task
                    example: IN_QUEUE
                  id:
                    type: string
                    description: The unique ID of the image generation request
                    example: 4f4b5af4-d5d0-413b-ba76-cee0f6d630b2-u1
        "400":
          description: Invalid request.
        "401":
          description: Unauthorized.
      security:
        - apiKeyAuth: []
    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
  /image/status/{statusId}:
    get:
      summary: Check image generation status
      description: Checks the status of an ongoing or completed image generation job.
      operationId: checkImageStatus
      parameters:
        - name: statusId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the image generation job.
          example: 8ec87436-f073-4a70-bee4-18c653c82e4c-e1
      responses:
        "200":
          description: Successful status check.
          content:
            application/json:
              schema:
                type: object
                properties:
                  delayTime:
                    type: integer
                    description: Delay time for task
                    example: 410
                  executionTime:
                    type: integer
                    description: Execution time of task in milliseconds
                    example: 5329
                  id:
                    type: string
                    description: The unique ID of the image generation task
                    example: a72ff596-9276-4a3b-825f-2d30898a7807-u1
                  output:
                    type: array
                    description: Array of output data
                    items:
                      type: string
                      example: data:None;base64,UklGRk59AABXRU..........zquYqRUYwyAAAAAA==
                  status:
                    type: string
                    description: The current status of the image generation task
                    example: COMPLETED
                  workerId:
                    type: string
                    description: The ID of the worker processing the task
                    example: 63a0wc0ornlzkv
        "400":
          description: Invalid request.
        "401":
          description: Unauthorized.
      security:
        - apiKeyAuth: []
    parameters:
      - *a1
components:
  securitySchemes: {}
security: {}
tags:
  - name: artificial-intelligence
    description: Operations related to artificial-intelligence
  - name: tools
    description: Operations related to tools
  - name: visual-recognition
    description: Operations related to visual-recognition
  - name: text-to-image
    description: Operations related to text-to-image
