{"openapi":"3.2.0","info":{"title":"AI Photo Studio API","description":"Generative visual AI studio: background removal, clothes segmentation, outpainting, portrait expressions, and hairstyles.","version":"1.0.0"},"servers":[{"url":"https://photo-studio.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Photo Studio"}],"x-agent-commerce":{"catalog_url":"https://photo-studio.jojapi.net/_jojapi/agent/plans","discovery_url":"https://photo-studio.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/itsrose-photo-studio-api","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/v1/remove-bg":{"post":{"operationId":"post_v1_remove_bg","summary":"Remove Background","description":"Isolate subjects and automatically remove background from an image.","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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"},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout (seconds). -1 means return immediately with a task ID. Default 30.","example":30}},"required":["init_image","sync_timeout"]},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","sync_timeout":30}}}}}},"/v1/restore-image":{"post":{"operationId":"post_v1_restore_image","summary":"Restore Image","description":"High-definition image quality restoration and denoising.","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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"},"ir_mode":{"description":"Effect mode","type":"string","enum":["wink-ultra-hd","xiuxiu-ultra-hd"]},"save_photo_format":{"description":"Output image format","type":"string","enum":["jpg","png"]},"use_denoise":{"description":"Background repair flag.","type":"boolean"},"use_hd_face_opt":{"description":"Portrait Repair Upgrade flag.","type":"boolean"},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout (seconds). -1 means return immediately with a task ID. Default 30.","example":30}},"required":["init_image","sync_timeout"],"title":"Image Restoration Request Schema"},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","ir_mode":"xiuxiu-ultra-hd","save_photo_format":"png","use_denoise":false,"use_hd_face_opt":true,"sync_timeout":30}}}}}},"/v1/outpaint":{"post":{"operationId":"post_v1_outpaint","summary":"AI Outpainting","description":"Expand canvas boundaries beyond the original frame using generative AI. Exlusive field *oneOf*: - `expand_ratio`: Expands the image canvas uniformly on all sides using a single ratio value. - `free_expand_ratio`: Expands the image canvas independently on each side using per-side ratio values. Use this when the subject is off-center or asymmetric padding is required. - `free_expand_pixel`: Expands the image canvas by an absolute pixel count on each side. Use this when you need precise control over the output image dimensions.","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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"},"expand_ratio":{"type":"number","minimum":0,"maximum":1,"multipleOf":0.1,"description":"Accepts a value between `0.0` and `1.0` in increments of `0.1`.\n\nThe final canvas size is calculated as: `original_size × (1 + ratio × 2)`.\n\n| Value | Width & Height Scale |\n|-------|----------------------|\n| `0.1` | 120% of original     |\n| `0.3` | 160% of original     |\n| `0.5` | 200% of original     |\n| `1.0` | 300% of original     |"},"free_expand_ratio":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1,"multipleOf":0.1,"description":"Expansion ratio for the left side. Range: `0.0` – `1.0`."},"right":{"type":"number","minimum":0,"maximum":1,"multipleOf":0.1,"description":"Expansion ratio for the right side. Range: `0.0` – `1.0`."},"top":{"type":"number","minimum":0,"maximum":1,"multipleOf":0.1,"description":"Expansion ratio for the top side. Range: `0.0` – `1.0`."},"bottom":{"type":"number","minimum":0,"maximum":1,"multipleOf":0.1,"description":"Expansion ratio for the bottom side. Range: `0.0` – `1.0`."}},"required":["left","right","top","bottom"],"title":"Per-Side Expansion Ratios","description":"Defines independent expansion ratios for each side of the image. \n- `left` and `right` are proportional to the original width. \n- `top` and `bottom` are proportional to the original height."},"free_expand_pixel":{"type":"object","properties":{"left":{"type":"integer","minimum":0,"maximum":2048,"description":"Pixels to add to the left side. Range: `0` – `2048`."},"right":{"type":"integer","minimum":0,"maximum":2048,"description":"Pixels to add to the right side. Range: `0` – `2048`."},"top":{"type":"integer","minimum":0,"maximum":2048,"description":"Pixels to add to the top side. Range: `0` – `2048`."},"bottom":{"type":"integer","minimum":0,"maximum":2048,"description":"Pixels to add to the bottom side. Range: `0` – `2048`."}},"required":["left","right","top","bottom"],"title":"Per-Side Expansion Pixels","description":"Defines the exact number of pixels to add to each side of the image canvas. Provides pixel-level precision for layouts where exact output dimensions are required."},"text":{"type":"string","description":"Outpainting text prompt guidance"},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout in seconds.","example":30}},"required":["init_image","sync_timeout"],"title":"Outpainting Request"},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","expand_ratio":0.5,"sync_timeout":30}}}}}},"/v1/segment-clothes":{"post":{"operationId":"post_v1_segment_clothes","summary":"Segment Clothing & Apparel","description":"Detect, isolate, and extract apparel categories and segmentation masks.","tags":["Photo Studio"],"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":{"segmentation_mask":{"type":"array","items":{"type":"string","format":"uri"},"description":"Array of segmentation mask URLs"},"labels":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["background","headpiece","hair","gloves","glasses","top","dress","coat","socks","pants","skin","scarf etc.","skirt","face","shoes","bag","accessories","jumpsuit","mannequin_stand"],"description":"Possible labels for segmented clothing items"},"n_label":{"type":"string","description":"Numeric label for the segmented clothing item"},"url":{"type":"string","format":"uri","description":"URL of the segmented clothing item"}},"required":["label","n_label","url"],"additionalProperties":false},"description":"Array of segmented clothing items"}},"required":["segmentation_mask","labels"],"additionalProperties":{}},"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"},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout (seconds). -1 means return immediately with a task ID. Default 30.","example":30}},"required":["init_image","sync_timeout"]},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","sync_timeout":30}}}}}},"/v1/expression":{"post":{"operationId":"post_v1_expression","summary":"Generate Facial Expression","description":"Modify portrait expressions with natural smiles, laughs, and dimple effects.","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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"},"smile_mode":{"type":"integer","minimum":0,"maximum":5,"description":"Smile mode:\n\n- 0: Laughing\n- 1: Smile\n- 2: Pursed lips smile\n- 3: Cool\n- 4: Classic smile with dimples\n- 5: Dimples secondary effect"},"cooler_flag":{"description":"Lips cooler interface flag (0: Default, 1: Enabled)","type":"integer","minimum":0,"maximum":1},"wb_flag":{"description":"White balance post-processing flag (0: Disabled, 1: Enabled)","type":"integer","minimum":0,"maximum":1},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout (seconds). -1 means return immediately with a task ID. Default 30.","example":30}},"required":["init_image","smile_mode","sync_timeout"],"title":"Expression Generation Request Schema"},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","smile_mode":0,"sync_timeout":30}}}}}},"/v1/hairstyle":{"post":{"operationId":"post_v1_hairstyle","summary":"Hairstyle Transformation","description":"Apply virtual haircuts, colors, and styling variations to portrait photos. List `hair_type`: [   '0',         '1',         '2',         '3',         '4',   '5',         '6',         '7',         '8',         '9',   '10',        '11',        '12',        '13',        '14',   '15',        '17',        '5-2',       '5-3',       '5-7',   '5-19',      '5-21',      '13-3',      '13-4',      '13-5',   '6-1',       '7-4',       '7-5',       '8-1',       '8-19',   '8-21',      '9-3',       '9-4',       '9-6',       '9-7',   '9-11',      '9-12',      '9-13',      '9-17',      '9-22',   '9-25',      '15-17',     '15-18',     '20-11',     '20-12',   '20-13',     'mail_0',    'mail_1',    'mail_2',    'mail_3',   'mail_4',    'mail_5',    'mail_6',    '1_II',      '2_II',   '5_II',      '6_II',      '7_II',      '10_II',     '11_II',   '13_II',     '15_II',     '17_II',     '0_II',      '3_II',   '4_II',      '8_II',      '9_II',      '12_II',     '14_II',   '21_II',     '22_II',     '23_II',     '24_II',     '25_II',   '26_II',     '27_II',     '28_II',     '29_II',     '30_II',   'mail_0_II', 'mail_1_II', 'mail_2_II', 'mail_3_II', 'mail_4_II',   'mail_5_II', 'mail_6_II' ]","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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"},"hair_type":{"type":"string","description":"Specifies the target hairstyle to apply. See Example rendered visual for more detail."},"sync_timeout":{"type":"number","minimum":-1,"maximum":60,"description":"Synchronized waiting timeout (seconds). -1 means return immediately with a task ID. Default 30.","example":30}},"required":["init_image","hair_type","sync_timeout"],"title":"Versatile Hairstyle Request"},"example":{"init_image":"https://assets.itsrose.net/public-resource/girl-in-red-dress.jpg","hair_type":"0","sync_timeout":30}}}}}},"/v1/task":{"get":{"operationId":"get_v1_task","summary":"Get Task Status","description":"Query processing status and download media for an asynchronous task. Free of charge.","tags":["Photo Studio"],"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":{"status":{"type":"string","enum":["not_started","in_progress","completed","failed"],"description":"Task execution status"},"task_id":{"type":"string","description":"Unique identifier of the task"},"media_list":{"type":"array","items":{"type":"string"},"description":"List of generated media result URLs"}},"required":["status","task_id","media_list"]},"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}}}},"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"}}}}},"parameters":[{"name":"task_id","in":"query","description":"Task id.","required":true,"schema":{"type":"string"}}]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}