{"openapi": "3.1.0", "info": {"title": "Exactly Public API", "version": "1.0.0", "description": ""}, "paths": {"/public/v1/models/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_create_model", "summary": "Create a new model", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateModelOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Create a new model for custom style.\n\nThe model starts in draft state and can be trained with training images.\n\n**Usage:**\n1. Create a model with a descriptive name\n2. Optionally provide custom JSON data (max 64KB) for your application's use\n3. Add training images using the `POST .../{uid}/train_images/` endpoint\n4. Train the model using the `POST .../{uid}/train/` endpoint\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model name must be 1-255 characters\n- Custom data (if provided) must be valid JSON under 64KB\n\n**Returns:**\n- 201: Model created successfully with unique identifier\n- 401: Invalid or missing API token", "tags": ["Models v1"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateModelIn"}}}, "required": true}, "security": [{"APITokenAuth": []}]}, "get": {"operationId": "durer_backend_public_api_api_routes_models_list_models", "summary": "List user's models", "parameters": [{"in": "query", "name": "limit", "schema": {"default": 100, "description": "Limit the number of results returned", "maximum": 5000, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false, "description": "Limit the number of results returned"}, {"in": "query", "name": "offset", "schema": {"default": 0, "description": "Offset the results by this number", "minimum": 0, "title": "Offset", "type": "integer"}, "required": false, "description": "Offset the results by this number"}, {"in": "query", "name": "active", "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Filter by active status (trained models)", "title": "Active"}, "required": false, "description": "Filter by active status (trained models)"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaginatedResponse_ModelOut_"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "List all models owned by the authenticated user.\n\nThis endpoint returns a paginated list of models owned by the requesting user.\n\n**Usage:**\n1. Request a list of models with optional filtering by active status\n2. Use pagination parameters to control the number of results\n\n**Query Parameters:**\n- `active`: Optional boolean to filter by active (trained) models\n- `limit`: Number of results per page (default: 100, max: 5000)\n- `offset`: Number of results to skip (default: 0)\n\n**Requirements:**\n- Valid API token in Authorization header\n\n**Returns:**\n- 200: Paginated list of models with total count\n- 401: Invalid or missing API token", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/": {"get": {"operationId": "durer_backend_public_api_api_routes_models_get_model", "summary": "Get a model by its unique identifier", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelDetailOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Retrieve a model by its unique identifier.\n\nThis endpoint returns the model's details, including its name, creation date, and status.\n\n**Usage:**\n1. Retrieve a model by its unique identifier\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must be owned by, shared with, or publicly accessible to the requesting user\n\n**Returns:**\n- 200: Model details\n- 401: Invalid or missing API token\n- 404: Model not found or not accessible", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}, "delete": {"operationId": "durer_backend_public_api_api_routes_models_delete_model", "summary": "Delete a model by its unique identifier", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Delete a model by its unique identifier.\n\nThis endpoint marks the model as deleted.\n\n**Usage:**\n1. Delete a model by its unique identifier\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n\n**Returns:**\n- 200: Model deleted successfully\n- 401: Invalid or missing API token\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/draft/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_make_model_draft", "summary": "Put a model into draft state", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Put a model into draft state.\n\nThis endpoint puts a model into draft state, allowing it to be retrained.\n\nNote: The model can still be used for generating images until it starts training.\n\n**Usage:**\n1. Put a model into draft state\n2. Add new training images to the model with the `POST .../{uid}/train_images/` endpoint\n3. Delete unnecessary training images with the `DELETE.../{uid}/train_images/{image_uid}/` endpoint\n4. Train the model using the `POST .../{uid}/train/` endpoint\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n\n**Returns:**\n- 200: Model put into draft state\n- 401: Invalid or missing API token\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/train_images/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_add_train_image", "summary": "Add a training image to a model", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StylisationItemOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Add a training image to a model.\n\nThis endpoint adds a new training image to the model's draft.\nThe image will be processed and added to the model's training dataset.\n\n**Usage:**\n1. Add a training image to a model\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n- Image must be a valid image file (max 50MB)\n\n**Returns:**\n- 201: Training image added successfully\n- 400: Invalid image file\n- 401: Invalid or missing API token\n- 403: Model is not in the draft state\n- 404: Model not found", "tags": ["Models v1"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"image": {"format": "binary", "title": "Image", "type": "string"}}, "required": ["image"], "title": "FileParams", "type": "object"}}}, "required": true}, "security": [{"APITokenAuth": []}]}, "get": {"operationId": "durer_backend_public_api_api_routes_models_list_train_images", "summary": "List training images for a model", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 100, "description": "Limit the number of results returned", "maximum": 5000, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false, "description": "Limit the number of results returned"}, {"in": "query", "name": "offset", "schema": {"default": 0, "description": "Offset the results by this number", "minimum": 0, "title": "Offset", "type": "integer"}, "required": false, "description": "Offset the results by this number"}, {"in": "query", "name": "include_filtered", "schema": {"default": false, "description": "Include filtered images in the response", "title": "Include Filtered", "type": "boolean"}, "required": false, "description": "Include filtered images in the response"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaginatedResponse_StylisationItemOut_"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "List all training images for a model.\n\nThis endpoint returns a paginated list of training images for the specified model.\n\n**Usage:**\n1. Request a list of training images for a model\n2. Use pagination parameters to control the number of results\n3. Optionally include filtered images that triggered hard filters\n\n**Query Parameters:**\n- `limit`: Number of results per page (default: 100, max: 5000)\n- `offset`: Number of results to skip (default: 0)\n- `include_filtered`: Include filtered images in results (default: false)\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n\n**Returns:**\n- 200: Paginated list of training images with total count\n- 401: Invalid or missing API token\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/train_images/{image_uid}/": {"delete": {"operationId": "durer_backend_public_api_api_routes_models_delete_item", "summary": "Delete a training image from a model", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}, {"in": "path", "name": "image_uid", "schema": {"format": "uuid", "title": "Image Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Delete a training image from a model.\n\nThis endpoint removes a training image from the model's draft.\n\n**Usage:**\n1. Delete a training image from a model\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n- Image must exist and be part of the model's training dataset\n\n**Returns:**\n- 200: Training image deleted successfully\n- 401: Invalid or missing API token\n- 404: Model or image not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/train/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_run_model_training", "summary": "Train a model", "parameters": [{"in": "path", "name": "uid", "schema": {"title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Train a model using its training dataset.\n\nThis endpoint starts the training process for the model.\nThe model will be trained using its training dataset.\n\n**Usage:**\n1. Train a model\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n- Model must have a training dataset\n\n**Returns:**\n- 200: Model training started successfully\n- 400: Invalid model state\n- 401: Invalid or missing API token\n- 403: Model is not in the draft state\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/cancel/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_cancel_model_training", "summary": "Cancel Model Training", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Cancel a model training.\n\nThis endpoint cancels the training process for the model.\n\n**Usage:**\n1. Run a model training\n2. Cancel a model training\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n- Model must be in the training state\n\n**Returns:**\n- 200: Model training canceled successfully\n- 401: Invalid or missing API token\n- 403: Model is not in the training state\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/train/progress/": {"get": {"operationId": "durer_backend_public_api_api_routes_models_get_model_training_progress", "summary": "Get Model Training Progress", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelTrainProgressOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Get the training progress for a model.\n\nThis endpoint returns the current training progress for the specified model.\nThe progress is returned as a percentage value from 0 to 100.\n\n**Behavior:**\n- If the model is active (training completed), returns 100% progress\n- If the model is still training, returns current progress (0-99%)\n- If no training status is found, returns 0% progress\n\n**Usage:**\n1. Check training progress during model training\n2. Monitor training completion status\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must exist and be owned by the requesting user\n\n**Returns:**\n- 200: Training progress percentage (0-100)\n- 401: Invalid or missing API token\n- 404: Model not found", "tags": ["Models v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/models/{uid}/enhance_prompt/": {"post": {"operationId": "durer_backend_public_api_api_routes_models_enhance_prompt_for_model", "summary": "Enhance a prompt for given model", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnhancedPromptOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Enhance a prompt for a given model.\n\n**Usage:**\n1. Enhance a prompt for a specific model\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must be owned by, shared with, or publicly accessible to the requesting user\n\n**Returns:**\n- 201: Enhanced prompt\n- 401: Invalid or missing API token\n- 404: Model not found or not accessible\n- 500: Internal server error", "tags": ["Models v1"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnhancePromptIn"}}}, "required": true}, "security": [{"APITokenAuth": []}]}}, "/public/v1/images/": {"post": {"operationId": "durer_backend_public_api_api_routes_images_generate_images", "summary": "Generate images using style model", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateImageOut"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/GenerateImageOut"}, {"$ref": "#/components/schemas/DurerError"}], "title": "Response"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Generate images using a trained style model.\n\nThis endpoint creates images from text prompts using your custom-trained style model.\nYou can optionally provide reference images to guide the generation process.\n\n**Note:** For style models trained via API, the requested size will be rounded to the nearest\navailable size (e.g., 1000x1000 \u2192 1024x1024). For other models, you must provide an exact\nsize from the model's supported dimensions.\n\n**Basic Usage:**\n```json\n{\n \"prompt\": \"a cat in a garden\",\n \"num_images\": 4,\n \"model_uid\": \"your-model-uuid\",\n \"size\": [1024, 1024]\n}\n```\n\n**With Reference Images:**\n```json\n{\n \"prompt\": \"a cat in a garden\",\n \"num_images\": 4,\n \"model_uid\": \"your-model-uuid\",\n \"size\": [1024, 1024],\n \"reference_images\": [\n {\n \"url\": \"https://example.com/sketch.jpg\",\n \"purpose\": \"sketch\",\n \"strength\": 0.8\n },\n {\n \"base64\": \"iVBORw0KGgo...\",\n \"purpose\": \"style\"\n }\n ]\n}\n```\n\n**Reference Image Purposes:**\n- `sketch`: Use image structure as guide (influence depends on the `strength` parameter)\n- `style`: Transfer artistic style from the reference image\n- `reference`: Use as general visual reference/guidance\n- `instruct`: Modify the reference image based on your prompt\n- `product`: Position a product in the generated image\n- `character`: Position a character in the generated image\n\n**Requirements:**\n- Valid API token in Authorization header\n- Model must be owned by you or publicly accessible\n- Model must be active\n- Prompt must be 1-10,000 characters\n- Reference images must be valid JPEG/PNG/GIF/BMP/WebP (max 50MB, min 64x64)\n- Maximum number of reference images depends on your model\n- Not all models support all reference types\n\n**Returns:**\n- 201: Images generated successfully with URLs and metadata\n- 400: Invalid request (inactive model, bad prompt, invalid reference images, etc.)\n- 401: Invalid or missing API token\n- 404: Model not found or not accessible\n- 500: Generation failed or timed out (includes error details and any partial results)", "tags": ["Images v1"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateImageIn"}}}, "required": true}, "security": [{"APITokenAuth": []}]}}, "/public/v1/images/{uid}/": {"get": {"operationId": "durer_backend_public_api_api_routes_images_get_image", "summary": "Get an image", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GeneratedImageOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Retrieve a specific image by its unique identifier.\n\nThis endpoint fetches the details of an image.\n\n**Usage:**\n1. Get the image's details and URL\n\n**Requirements:**\n- Valid API token in Authorization header\n- Image must exist and be owned by the user\n\n**Returns:**\n- 200: Image details including metadata and URL\n- 401: Invalid or missing API token\n- 404: If the image does not exist", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/images/{uid}/upscales/": {"post": {"operationId": "durer_backend_public_api_api_routes_images_upscale_image", "summary": "Upscale an image", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Initiate an asynchronous image upscaling task.\n\nThis endpoint starts a background task to upscale an image to a higher resolution.\nSupported scales are \"2k\", \"4k\", \"6k\", and \"8k\".\nThe task runs asynchronously and the result can be retrieved later.\n\n**Usage:**\n1. Send a POST request with the image's unique identifier and upscale parameters\n2. Receive a message indicating the upscale task has been launched\n3. Check the status of the task using the `.../{uid}/upscales/{scale}/` endpoint\n4. Retrieve the upscaled image using the `.../{uid}/upscales/{scale}/` endpoint when it's ready\n\n**Requirements:**\n- Valid API token in Authorization header\n- Image must exist and be owned by the user\n- Scale must be one of the supported values\n\n**Returns:**\n- 202: Upscale task has been successfully launched\n- 401: Invalid or missing API token\n- 404: If the image does not exist", "tags": ["Images v1"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpscaleImageIn"}}}, "required": true}, "security": [{"APITokenAuth": []}]}}, "/public/v1/images/{uid}/upscales/{scale}/": {"get": {"operationId": "durer_backend_public_api_api_routes_images_get_image_upscale", "summary": "Get image upscale", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}, {"in": "path", "name": "scale", "schema": {"enum": ["2k", "4k", "6k", "8k"], "title": "Scale", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpscaleImageOut"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Retrieve the upscaled version of an image at a specific resolution.\n\nThis endpoint checks the status of an upscale task and returns the result if available.\n\n**Usage:**\n1. Send a GET request with the image's unique identifier and target upscale resolution\n2. Receive a message indicating the status of the upscale task if the upscaled image is not available\n3. Receive the upscaled image's details and URL if the upscaled image is available\n\n**Requirements:**\n- Valid API token in Authorization header\n- Image must exist and be owned by the user\n- Scale must be one of the supported values\n\n**Returns:**\n- 200: Upscaled image details with URL and dimensions\n- 202: If the upscale task is still processing\n- 401: Invalid or missing API token\n- 404: If the image or upscale does not exist\n- 500: If the upscale task failed during processing", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/images/{uid}/vectors/": {"post": {"operationId": "durer_backend_public_api_api_routes_images_vectorize_image", "summary": "Vectorize an image", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Initiate an asynchronous image vectorization task.\n\nThis endpoint starts a background task to vectorize an image.\nThe task runs asynchronously and the result can be retrieved later.\n\n**Usage:**\n1. Send a POST request with the image's unique identifier\n2. Receive a message indicating the vectorize task has been launched\n3. Check the status of the task using the `.../{uid}/vectorize/` endpoint\n4. Retrieve the vectorized image using the `.../{uid}/vectorize/` endpoint when it's ready\n\n**Requirements:**\n- Valid API token in Authorization header\n- Image must exist and be owned by the user\n\n**Returns:**\n- 202: Vectorization task has been successfully launched\n- 404: If the image does not exist", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}, "get": {"operationId": "durer_backend_public_api_api_routes_images_get_image_vector", "summary": "Get the last image vector", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VectorImageOut"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Retrieve the vectorized version of an image.\n\nThis endpoint checks the status of a vectorization task and returns the result if available.\n\n**Usage:**\n1. Send a GET request with the image's unique identifier\n2. Receive a message indicating the status of the vectorization task if the vectorized image is not available\n3. Receive the vectorized image's details with base64-encoded SVG content if the vectorized image is available\n\n**Requirements:**\n- Valid API token in Authorization header\n- Image must exist and be owned by the user\n\n**Returns:**\n- 200: Vectorized image details with base64-encoded SVG content\n- 202: If the vectorization task is still processing\n- 401: Invalid or missing API token\n- 404: If the image or vector image does not exist\n- 500: If the vectorization task failed during processing", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}}, "/public/v1/images/{uid}/remove-bg/": {"post": {"operationId": "durer_backend_public_api_api_routes_images_remove_bg_image", "summary": "Remove background from an image", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Initiate an asynchronous background removal task for an image.\n\nMirrors the vectorization flow but uses background removal.\n\nReturns:\n- 202: Remove background task launched\n- 404: Image not found", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}, "get": {"operationId": "durer_backend_public_api_api_routes_images_get_removed_bg_image", "summary": "Get the last background-removed image", "parameters": [{"in": "path", "name": "uid", "schema": {"format": "uuid", "title": "Uid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RemoveBgImageOut"}}}}, "202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerMessage"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DurerError"}}}}}, "description": "Retrieve the image with background removed.\n\nMirrors the vectorization retrieval flow, returning base64-encoded PNG.", "tags": ["Images v1"], "security": [{"APITokenAuth": []}]}}}, "components": {"schemas": {"CreateModelOut": {"properties": {"uid": {"description": "Unique identifier for the created model", "format": "uuid", "title": "Uid", "type": "string"}}, "required": ["uid"], "title": "CreateModelOut", "type": "object"}, "DurerError": {"properties": {"message": {"description": "Error message", "examples": ["Something went wrong"], "title": "Message", "type": "string"}, "client_message": {"description": "Error message for the client", "examples": ["Something went wrong"], "title": "Client Message", "type": "string"}}, "required": ["message"], "title": "DurerError", "type": "object"}, "CreateModelIn": {"properties": {"name": {"description": "Display name of the model", "maxLength": 255, "minLength": 1, "title": "Name", "type": "string"}, "custom_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "description": "Optional custom JSON data to store with the model (max 64KB)", "title": "Custom Data"}}, "required": ["name"], "title": "CreateModelIn", "type": "object"}, "LimitOffsetQueryParams": {"properties": {"limit": {"default": 100, "description": "Limit the number of results returned", "maximum": 5000, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "description": "Offset the results by this number", "minimum": 0, "title": "Offset", "type": "integer"}}, "title": "LimitOffsetQueryParams", "type": "object"}, "ModelsQueryParams": {"properties": {"active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Filter by active status (trained models)", "title": "Active"}}, "title": "ModelsQueryParams", "type": "object"}, "ModelOut": {"properties": {"uid": {"description": "Unique identifier for the model", "format": "uuid", "title": "Uid", "type": "string"}, "name": {"description": "Display name of the model", "title": "Name", "type": "string"}, "active": {"description": "Whether the model is trained and ready for use", "title": "Active", "type": "boolean"}, "custom_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "description": "Custom JSON data provided by the user", "title": "Custom Data"}, "status": {"$ref": "#/components/schemas/ModelStatus", "description": "Current status of the model"}}, "required": ["uid", "name", "active", "status"], "title": "ModelOut", "type": "object"}, "ModelStatus": {"description": "Model status enum for API responses", "enum": ["draft", "training", "ready", "deleted"], "title": "ModelStatus", "type": "string"}, "PaginatedResponse_ModelOut_": {"properties": {"items": {"description": "The list of results", "items": {"$ref": "#/components/schemas/ModelOut"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}, "total_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Total Count"}}, "required": ["items", "count"], "title": "PaginatedResponse[ModelOut]", "type": "object"}, "GenerationParamsOut": {"properties": {"supported_dimensions": {"description": "Supported image dimensions as [width, height] pairs", "items": {"maxItems": 2, "minItems": 2, "prefixItems": [{"type": "integer"}, {"type": "integer"}], "type": "array"}, "title": "Supported Dimensions", "type": "array"}, "size_optional": {"description": "Whether the size parameter can be omitted", "title": "Size Optional", "type": "boolean"}, "max_reference_images": {"description": "Maximum number of reference images allowed", "title": "Max Reference Images", "type": "integer"}, "duration": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Duration in seconds (video models only)", "title": "Duration"}, "resolution": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Resolution tier (e.g. 1024, 2048)", "title": "Resolution"}, "fps": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Frames per second (video models only)", "title": "Fps"}}, "required": ["supported_dimensions", "size_optional", "max_reference_images"], "title": "GenerationParamsOut", "type": "object"}, "ModelDetailOut": {"properties": {"uid": {"description": "Unique identifier for the model", "format": "uuid", "title": "Uid", "type": "string"}, "name": {"description": "Display name of the model", "title": "Name", "type": "string"}, "active": {"description": "Whether the model is trained and ready for use", "title": "Active", "type": "boolean"}, "custom_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "description": "Custom JSON data provided by the user", "title": "Custom Data"}, "status": {"$ref": "#/components/schemas/ModelStatus", "description": "Current status of the model"}, "generation_params": {"description": "Generation parameters per resolution tier", "items": {"$ref": "#/components/schemas/GenerationParamsOut"}, "title": "Generation Params", "type": "array"}, "available_purposes": {"description": "Available reference image purposes for this model", "items": {"type": "string"}, "title": "Available Purposes", "type": "array"}, "available_qualities": {"description": "Allowed values for the `quality` parameter on this model. Empty if quality is not supported.", "items": {"type": "string"}, "title": "Available Qualities", "type": "array"}}, "required": ["uid", "name", "active", "status", "generation_params", "available_purposes"], "title": "ModelDetailOut", "type": "object"}, "DurerMessage": {"properties": {"message": {"description": "Message", "examples": ["success"], "title": "Message", "type": "string"}}, "required": ["message"], "title": "DurerMessage", "type": "object"}, "StylisationItemFilterOut2": {"properties": {"name": {"description": "Name of the filter applied", "title": "Name", "type": "string"}, "level": {"description": "Filter severity level (HARD or SOFT)", "title": "Level", "type": "string"}, "is_triggered": {"description": "Whether this filter was triggered", "title": "Is Triggered", "type": "boolean"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Reason why the filter was triggered", "title": "Reason"}, "is_ignored": {"description": "Whether this filter result is ignored", "title": "Is Ignored", "type": "boolean"}}, "required": ["name", "level", "is_triggered", "is_ignored"], "title": "StylisationItemFilterOut2", "type": "object"}, "StylisationItemImageOut": {"properties": {"uid": {"description": "Unique identifier for the image", "format": "uuid", "title": "Uid", "type": "string"}, "url_set": {"$ref": "#/components/schemas/UrlSetSchema", "description": "Set of image URLs in different sizes"}, "width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Original image width in pixels", "title": "Width"}, "height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Original image height in pixels", "title": "Height"}}, "required": ["uid", "url_set"], "title": "StylisationItemImageOut", "type": "object"}, "StylisationItemOut": {"properties": {"uid": {"description": "Unique identifier for the training image", "format": "uuid", "title": "Uid", "type": "string"}, "image": {"$ref": "#/components/schemas/StylisationItemImageOut", "description": "Image details and URLs"}, "filters": {"description": "List of filters applied to this image", "items": {"$ref": "#/components/schemas/StylisationItemFilterOut2"}, "title": "Filters", "type": "array"}}, "required": ["uid", "image", "filters"], "title": "StylisationItemOut", "type": "object"}, "UrlSetEntrySchema": {"description": "A single url data for an url set.", "properties": {"url": {"format": "uri", "minLength": 1, "title": "Url", "type": "string"}, "width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Width"}, "height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Height"}, "watermark": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Watermark"}}, "required": ["url"], "title": "UrlSetEntrySchema", "type": "object"}, "UrlSetSchema": {"description": "An url set for an image.", "properties": {"hires": {"$ref": "#/components/schemas/UrlSetEntrySchema"}, "lores": {"$ref": "#/components/schemas/UrlSetEntrySchema"}}, "required": ["hires", "lores"], "title": "UrlSetSchema", "type": "object"}, "TrainImagesQueryParams": {"properties": {"include_filtered": {"default": false, "description": "Include filtered images in the response", "title": "Include Filtered", "type": "boolean"}}, "title": "TrainImagesQueryParams", "type": "object"}, "PaginatedResponse_StylisationItemOut_": {"properties": {"items": {"description": "The list of results", "items": {"$ref": "#/components/schemas/StylisationItemOut"}, "title": "Items", "type": "array"}, "count": {"title": "Count", "type": "integer"}, "total_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Total Count"}}, "required": ["items", "count"], "title": "PaginatedResponse[StylisationItemOut]", "type": "object"}, "ModelTrainProgressOut": {"properties": {"progress": {"description": "Training progress in percentage (0-100)", "maximum": 100, "minimum": 0, "title": "Progress", "type": "integer"}}, "required": ["progress"], "title": "ModelTrainProgressOut", "type": "object"}, "EnhancedPromptOut": {"properties": {"prompt": {"description": "Enhanced text prompt", "title": "Prompt", "type": "string"}}, "required": ["prompt"], "title": "EnhancedPromptOut", "type": "object"}, "EnhancePromptIn": {"properties": {"prompt": {"description": "Text prompt to enhance", "maxLength": 10000, "minLength": 1, "title": "Prompt", "type": "string"}, "n_images": {"default": 1, "description": "Number of images which will be generated using the enhanced prompt", "exclusiveMinimum": 0, "title": "N Images", "type": "integer"}}, "required": ["prompt"], "title": "EnhancePromptIn", "type": "object"}, "GenerateImageOut": {"description": "Response for image generation requests.", "properties": {"images": {"description": "List of generated images with metadata and URLs", "items": {"$ref": "#/components/schemas/GeneratedImageOut"}, "title": "Images", "type": "array"}, "error": {"anyOf": [{"$ref": "#/components/schemas/GenerationErrorOut"}, {"type": "null"}], "description": "Error details if generation failed"}}, "title": "GenerateImageOut", "type": "object"}, "GeneratedImageOut": {"properties": {"uid": {"description": "Unique identifier for the generated image", "format": "uuid", "title": "Uid", "type": "string"}, "width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Width of the generated image in pixels", "title": "Width"}, "height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Height of the generated image in pixels", "title": "Height"}, "url": {"description": "Direct URL to access the generated image", "format": "uri", "minLength": 1, "title": "Url", "type": "string"}}, "required": ["uid", "url"], "title": "GeneratedImageOut", "type": "object"}, "GenerationErrorOut": {"description": "Error details for generation failures.", "properties": {"error_code": {"description": "Error code identifying the type of error", "title": "Error Code", "type": "string"}, "message": {"description": "Error message", "title": "Message", "type": "string"}}, "required": ["error_code", "message"], "title": "GenerationErrorOut", "type": "object"}, "GenerateImageIn": {"properties": {"prompt": {"description": "Text prompt of the image to generate", "maxLength": 10000, "minLength": 1, "title": "Prompt", "type": "string"}, "num_images": {"default": 1, "description": "Number of images to generate (1-100)", "exclusiveMinimum": 0, "maximum": 100, "minimum": 1, "title": "Num Images", "type": "integer"}, "model_uid": {"description": "UUID of the style model to use for generation", "format": "uuid", "title": "Model Uid", "type": "string"}, "size": {"anyOf": [{"maxItems": 2, "minItems": 2, "prefixItems": [{"type": "integer"}, {"type": "integer"}], "type": "array"}, {"type": "null"}], "description": "Image dimensions as [width, height] in pixels. Optional - some models don't support custom dimensions.", "title": "Size"}, "reference_images": {"anyOf": [{"items": {"$ref": "#/components/schemas/ReferenceImageIn"}, "maxItems": 10, "type": "array"}, {"type": "null"}], "description": "Optional reference images to guide generation. Maximum number depends on a model (typically 1-5). Not all models support all reference types. Images will be validated before generation.", "title": "Reference Images"}, "quality": {"anyOf": [{"enum": ["low", "medium", "high", "auto"], "type": "string"}, {"type": "null"}], "description": "Optional quality level. Allowed values depend on the model (see `available_qualities` in the model detail response). Omit for default behavior.", "title": "Quality"}}, "required": ["prompt", "model_uid"], "title": "GenerateImageIn", "type": "object"}, "ReferenceImageIn": {"description": "A reference image to guide generation.", "properties": {"url": {"anyOf": [{"format": "uri", "minLength": 1, "type": "string"}, {"type": "null"}], "description": "Public URL to reference image", "title": "Url"}, "base64": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Base64-encoded image data (PNG/JPEG). For large images, prefer using url.", "title": "Base64"}, "purpose": {"default": "reference", "description": "How this image should influence generation. 'sketch' uses edge detection, 'style' transfers artistic style, 'reference' uses as general guide, 'instruct' enables image editing based on prompt, 'product'/'character' position specific elements.", "enum": ["sketch", "style", "reference", "instruct", "product", "character"], "title": "Purpose", "type": "string"}, "strength": {"anyOf": [{"maximum": 1.0, "minimum": 0.01, "type": "number"}, {"type": "null"}], "description": "Influence strength (0.01-1). Only applicable for 'sketch' purpose. Higher values = stronger influence.", "title": "Strength"}}, "title": "ReferenceImageIn", "type": "object"}, "UpscaleImageIn": {"properties": {"scale": {"description": "Upscale resolution", "enum": ["2k", "4k", "6k", "8k"], "title": "Scale", "type": "string"}}, "required": ["scale"], "title": "UpscaleImageIn", "type": "object"}, "UpscaleImageOut": {"properties": {"uid": {"description": "Unique identifier for the upscaled image", "format": "uuid", "title": "Uid", "type": "string"}, "width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Width of the upscaled image in pixels", "title": "Width"}, "height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "Height of the upscaled image in pixels", "title": "Height"}, "url": {"description": "Direct URL to access the upscaled image", "format": "uri", "minLength": 1, "title": "Url", "type": "string"}}, "required": ["uid", "url"], "title": "UpscaleImageOut", "type": "object"}, "VectorImageOut": {"properties": {"uid": {"description": "Unique identifier for the vector image", "format": "uuid", "title": "Uid", "type": "string"}, "base64": {"description": "Base64-encoded vector image data", "title": "Base64", "type": "string"}}, "required": ["uid", "base64"], "title": "VectorImageOut", "type": "object"}, "RemoveBgImageOut": {"properties": {"uid": {"description": "Unique identifier for the background-removed image", "format": "uuid", "title": "Uid", "type": "string"}, "base64": {"description": "Base64-encoded PNG image data with background removed", "title": "Base64", "type": "string"}}, "required": ["uid", "base64"], "title": "RemoveBgImageOut", "type": "object"}}, "securitySchemes": {"APITokenAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}