{"openapi":"3.2.0","info":{"title":"AI Photo Enhancer API","description":"Professional AI photo restoration, face enhancement, bokeh depth-of-field, and super-resolution upscaling.","version":"1.0.0"},"servers":[{"url":"https://photo-enhancer.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Photo Enhancement"}],"x-agent-commerce":{"catalog_url":"https://photo-enhancer.jojapi.net/_jojapi/agent/plans","discovery_url":"https://photo-enhancer.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/itsrose-photo-enhancer-api","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/v1/enhance":{"post":{"operationId":"post_v1_enhance","summary":"Enhance Photo","description":"Enhance and restore photos using AI pipelines including face restoration, super-resolution background upsampling, bokeh depth-of-field, dodge & burn retouching, and color balancing.","tags":["Photo Enhancement"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"title":"Success indicator","description":"Indicates that the response represents a successful operation."},"code":{"type":"number","title":"Response code","description":"The numeric code representing the success status."},"message":{"type":"string","title":"Response message","description":"A human-readable message providing additional information."},"data":{"type":"object","properties":{"media_list":{"type":"array","items":{"type":"string","format":"uri"},"description":"The media access url."}},"required":["media_list"],"additionalProperties":false},"errors":{"type":"string","nullable":true,"enum":[null],"title":"No errors on success responses","description":"The errors field is always null for success responses."},"meta":{"default":{},"title":"Metadata","description":"Additional metadata related to the response. **Do not** rely on this field for any critical information, as it may be omitted or changed without notice.","type":"object","additionalProperties":{}}},"required":["ok","code","message","data","errors","meta"],"additionalProperties":false}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false],"title":"Failure indicator","description":"Indicates that the response represents a failed operation."},"code":{"type":"number","title":"Response code","description":"The numeric code representing the failure status."},"message":{"type":"string","title":"Response message","description":"A human-readable message providing additional information."},"data":{"type":"string","nullable":true,"enum":[null],"title":"No data on failure responses","description":"The data field is always null for failure responses."},"errors":{"default":{},"title":"Error details","description":"The errors field contains details about the failure. It is optional and may be omitted if no additional error information is provided.","type":"object","additionalProperties":{}},"meta":{"default":{},"title":"Metadata","description":"Additional metadata related to the response. **Do not** rely on this field for any critical information, as it may be omitted or changed without notice.","type":"object","additionalProperties":{}}},"required":["ok","code","message","data","errors","meta"],"additionalProperties":false,"description":"Representing a failed response.","title":"Failure Response Schema"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false],"title":"Failure indicator","description":"Indicates that the response represents a failed operation."},"code":{"type":"number","title":"Response code","description":"The numeric code representing the failure status."},"message":{"type":"string","title":"Response message","description":"A human-readable message providing additional information."},"data":{"type":"string","nullable":true,"enum":[null],"title":"No data on failure responses","description":"The data field is always null for failure responses."},"errors":{"default":{},"title":"Error details","description":"The errors field contains details about the failure. It is optional and may be omitted if no additional error information is provided.","type":"object","additionalProperties":{}},"meta":{"default":{},"title":"Metadata","description":"Additional metadata related to the response. **Do not** rely on this field for any critical information, as it may be omitted or changed without notice.","type":"object","additionalProperties":{}}},"required":["ok","code","message","data","errors","meta"],"additionalProperties":false,"description":"Representing a failed response.","title":"Failure Response Schema"}}}}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"init_image":{"anyOf":[{"title":"url","type":"string","format":"uri"},{"title":"base64","type":"string","format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}],"description":"The URL or base64 string of the image to be used as the initial image.","example":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg"},"pipelines":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"auto_balance":{"type":"object","properties":{"auto_contrast":{"type":"object","properties":{"contrast_intensity_coefficient":{"type":"number","minimum":0,"maximum":10,"description":"Coefficient controlling contrast intensity for automatic contrast adjustment."}},"required":["contrast_intensity_coefficient"]}},"required":["auto_contrast"],"example":{"auto_contrast":{"contrast_intensity_coefficient":1.5}}},"background_enhance":{"type":"object","properties":{"model":{"type":"string","enum":["shiba-strong-tensorrt","rhino-tensorrt","upsampler-bicubic"],"description":"Identifier of the model used for background enhancement or upsampling."},"remove_color_shift":{"type":"boolean","description":"When true, removes color shifts as part of background enhancement."}},"required":["model","remove_color_shift"],"example":{"model":"shiba-strong-tensorrt","remove_color_shift":true}},"bokeh":{"type":"object","properties":{"aperture_radius":{"type":"number","minimum":0,"maximum":1,"description":"A normalized aperture radius for the bokeh effect. Value must be between 0 and 1."},"apply_front_bokeh":{"type":"boolean","description":"Flag indicating whether the bokeh effect should be applied to foreground elements."},"group_picture":{"type":"boolean","description":"Flag indicating if the image contains multiple subjects (group photo), which may alter face-related processing."},"highlights":{"type":"number","minimum":0,"maximum":1,"description":"Normalized intensity of highlights in the bokeh effect (0 to 1)."},"rescale_kernel_for_small_images":{"type":"boolean","description":"When true, rescales the blur kernel for small images to preserve bokeh quality."},"vivid":{"type":"number","minimum":0,"maximum":1,"description":"Normalized vividness parameter for the bokeh effect (0 to 1)."}},"required":["aperture_radius","apply_front_bokeh","group_picture","highlights","rescale_kernel_for_small_images","vivid"],"example":{"aperture_radius":0.3,"apply_front_bokeh":false,"group_picture":true,"highlights":0.25,"rescale_kernel_for_small_images":true,"vivid":0.75}},"color_enhance":{"type":"object","properties":{"model":{"type":"string","enum":["prism-blend","orange-teal","orange-teal_v2","silky","muted","lit_soft_warm","prism-expert-a","prism-expert-c"],"description":"Identifier of the color enhancement model to apply."}},"required":["model"],"example":{"model":"muted"}},"dodge_burn":{"type":"object","properties":{"model":{"type":"string","enum":["dodge_burn_residuals_big"],"description":"Identifier for the dodge-and-burn residuals model."},"intensity":{"type":"number","minimum":0,"maximum":1,"description":"Intensity of the dodge-and-burn effect, normalized from 0.0 to 1.0."}},"required":["model","intensity"],"example":{"intensity":0.5,"model":"dodge_burn_residuals_big"}},"face_enhance":{"type":"object","properties":{"model":{"type":"string","enum":["remini","recommender_entire_dataset"],"description":"Identifier of the face enhancement model to apply."},"pre_blur":{"type":"number","minimum":0,"maximum":1,"description":"Amount of pre-blur applied prior to face enhancement, normalized between 0 and 1."}},"required":["model","pre_blur"],"example":{"model":"remini","pre_blur":0.6}},"face_lifting":{"type":"object","properties":{"model":{"type":"string","enum":["movie-style","marzipan-style","pinko_bigger_dataset-style"],"description":"Identifier of the face lifting model to be applied."}},"required":["model"],"example":{"model":"movie-style"}}}},"description":"Ordered list of image processing pipelines to execute (min 1, max 5).\n\n> [!warning] Unsuppoer mix of feature will cause an error"}},"required":["init_image","pipelines"]},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","pipelines":[{"auto_balance":{"auto_contrast":{"contrast_intensity_coefficient":1.5}},"background_enhance":{"model":"shiba-strong-tensorrt","remove_color_shift":true},"bokeh":{"aperture_radius":0.3,"apply_front_bokeh":false,"group_picture":true,"highlights":0.25,"rescale_kernel_for_small_images":true,"vivid":0.75},"color_enhance":{"model":"muted"},"dodge_burn":{"intensity":0.5,"model":"dodge_burn_residuals_big"},"face_enhance":{"model":"remini","pre_blur":0.6},"face_lifting":{"model":"movie-style"}}]}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}