{"swagger": "2.0", "basePath": "/api", "paths": {"/v2/auto_worker_type": {"get": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Recommended worker type details", "schema": {"$ref": "#/definitions/AutoWorkerTypeResponse"}}}, "summary": "Get the recommended worker type for the user", "operationId": "get_auto_worker_type", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/collection_by_name/{collection_name}": {"parameters": [{"name": "collection_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Lists collection information by name", "schema": {"$ref": "#/definitions/ResponseModelCollection"}}}, "summary": "Seeks an style collection by name and displays its information", "operationId": "get_single_collection_by_name", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/collections": {"get": {"responses": {"200": {"description": "Lists collection information", "schema": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelCollection"}}}}, "summary": "Displays all existing collections", "description": "Can filter by type", "operationId": "get_collection", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "sort", "in": "query", "type": "string", "description": "How to sort returned styles. 'popular' sorts by usage and 'age' sorts by date added.", "default": "popular"}, {"name": "page", "in": "query", "type": "integer", "description": "Which page of results to return. Each page has 25 styles.", "default": 1}, {"name": "type", "in": "query", "type": "string", "description": "Filter by type. Accepts either 'image', 'text' or 'all'.", "default": "all"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Collection Added", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Creates a new style collection", "operationId": "post_collection", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/InputModelCollection"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/collections/{collection_id}": {"parameters": [{"name": "collection_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Collection Modified", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Modifies an existing style collection", "operationId": "patch_single_collection", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/InputModelCollection"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Operation Completed", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Deletes a style collection", "operationId": "delete_single_collection", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"200": {"description": "Lists collection information", "schema": {"$ref": "#/definitions/ResponseModelCollection"}}}, "summary": "Displays information about a single style collection", "operationId": "get_single_collection", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/documents/privacy": {"get": {"responses": {"200": {"description": "AI Power Grid documentation", "schema": {"$ref": "#/definitions/HordeDocument"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}}, "summary": "Privacy Policy", "operationId": "get_docs_privacy", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "format", "in": "query", "type": "string", "description": "html or markdown", "default": "html"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/documents/sponsors": {"get": {"responses": {"200": {"description": "AI Power Grid documentation", "schema": {"$ref": "#/definitions/HordeDocument"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}}, "summary": "Sponsors", "operationId": "get_docs_sponsors", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "format", "in": "query", "type": "string", "description": "html or markdown", "default": "html"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/documents/terms": {"get": {"responses": {"200": {"description": "AI Power Grid documentation", "schema": {"$ref": "#/definitions/HordeDocument"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}}, "summary": "Terms and Conditions", "operationId": "get_docs_terms", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "format", "in": "query", "type": "string", "description": "html or markdown", "default": "html"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/filters": {"put": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "201": {"description": "New Filter details", "schema": {"$ref": "#/definitions/FilterDetails"}}}, "summary": "Moderator Only: Add a new regex filter", "operationId": "put_filters", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/PutNewFilter"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Filters List", "schema": {"type": "array", "items": {"$ref": "#/definitions/FilterDetails"}}}}, "summary": "Moderator Only: A List all filters, or filtered by the query", "operationId": "get_filters", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "filter_type", "in": "query", "type": "integer", "description": "The filter type."}, {"name": "contains", "in": "query", "type": "string", "description": "Only return filter containing this word."}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Returns the suspicion of the provided prompt. A suspicion of 2 or more means it would be blocked.", "schema": {"$ref": "#/definitions/FilterPromptSuspicion"}}}, "summary": "Moderator Only: Check The suspicion of the provided prompt", "operationId": "post_filters", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"prompt": {"type": "string"}, "filter_type": {"type": "integer"}}}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/filters/regex": {"get": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Filters Regex", "schema": {"type": "array", "items": {"$ref": "#/definitions/FilterRegex"}}}}, "summary": "Moderator Only: A List all filters, or filtered by the query", "operationId": "get_filter_regex", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "filter_type", "in": "query", "type": "integer", "description": "The filter type."}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/filters/{filter_id}": {"parameters": [{"name": "filter_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Patched Filter details", "schema": {"$ref": "#/definitions/FilterDetails"}}}, "summary": "Moderator Only: Modify an existing regex filter", "operationId": "patch_filter_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/PatchExistingFilter"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Filter Deleted", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Moderator Only: Delete a regex filter", "operationId": "delete_filter_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Filters List", "schema": {"type": "array", "items": {"$ref": "#/definitions/FilterDetails"}}}}, "summary": "Moderator Only: Display a single filter", "operationId": "get_filter_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/find_user": {"get": {"responses": {"404": {"description": "User Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Worker Details", "schema": {"$ref": "#/definitions/UserDetails"}}}, "summary": "Lookup user details based on their API key", "description": "This can be used to verify a user exists", "operationId": "get_find_user", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "User API key we're looking for."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/async": {"post": {"responses": {"429": {"description": "Too Many Prompts", "schema": {"$ref": "#/definitions/RequestError"}}, "503": {"description": "Maintenance Mode", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "202": {"description": "Generation Queued", "schema": {"$ref": "#/definitions/RequestAsync"}}}, "summary": "Initiate an Asynchronous request to generate images", "description": "This endpoint will immediately return with the UUID of the request for generation.\nThis endpoint will always be accepted, even if there are no workers available currently to fulfill this request.\nPerhaps some will appear in the next 10 minutes.\nAsynchronous requests live for 10 minutes before being considered stale and being deleted.", "operationId": "post_image_async_generate", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/GenerationInputStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/check/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Async Request Status Check", "schema": {"$ref": "#/definitions/RequestStatusCheck"}}}, "summary": "Retrieve the status of an Asynchronous generation request without images", "description": "Use this request to check the status of a currently running asynchronous request without consuming bandwidth.", "operationId": "get_image_async_check", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/pop": {"post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Generation Popped", "schema": {"$ref": "#/definitions/GenerationPayloadStable"}}}, "summary": "Check if there are generation requests queued for fulfillment", "description": "This endpoint is used by registered workers only", "operationId": "post_image_job_pop", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/PopInputStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/progress": {"post": {"responses": {"404": {"description": "Job Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Invalid Request", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Progress Updated"}}, "summary": "Report progress on an active generation job", "description": "Workers can use this endpoint to report their progress during generation,\nallowing clients to see real-time step progress.", "operationId": "post_job_progress_update", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The worker's API key."}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"id": {"type": "string"}, "current_step": {"type": "integer"}, "total_steps": {"type": "integer"}}}}], "tags": ["v2"]}}, "/v2/generate/rate/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"404": {"description": "Generation Request Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Aesthetics Already Submitted", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Aesthetics Submitted", "schema": {"$ref": "#/definitions/GenerationSubmitted"}}}, "summary": "Submit aesthetic ratings for generated images to be used by LAION and Stability", "description": "AI\nThe request has to have been sent as shared: true.\nYou can select the best image in the set, and/or provide a rating for each or some images in the set.\nIf you select best-of image, you will gain 4 kudos. Each rating is 5 kudos. Best-of will be ignored when ratings conflict with it.\nYou can never gain more kudos than you spent for this generation. Your reward at max will be your kudos consumption - 1.", "operationId": "post_aesthetics", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/AestheticsPayload"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/status/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Async Request Full Status", "schema": {"$ref": "#/definitions/RequestStatusStable"}}}, "summary": "Cancel an unfinished request", "description": "This request will include all already generated images in base64 encoded .webp files.", "operationId": "delete_image_async_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Async Request Full Status", "schema": {"$ref": "#/definitions/RequestStatusStable"}}}, "summary": "Retrieve the full status of an Asynchronous generation request", "description": "This request will include all already generated images in download URL or base64 encoded .webp files.\nAs such, you are requested to not retrieve this endpoint often. Instead use the /check/ endpoint first\nThis endpoint is limited to 10 request per minute", "operationId": "get_image_async_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/submit": {"post": {"responses": {"404": {"description": "Request Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Generation Already Submitted", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Generation Submitted", "schema": {"$ref": "#/definitions/GenerationSubmitted"}}}, "summary": "Submit a generated image", "description": "This endpoint is used by registered workers only", "operationId": "post_image_job_submit", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The worker's owner API key."}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SubmitInputStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/text/async": {"post": {"responses": {"429": {"description": "Too Many Prompts", "schema": {"$ref": "#/definitions/RequestError"}}, "503": {"description": "Maintenance Mode", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "202": {"description": "Generation Queued", "schema": {"$ref": "#/definitions/RequestAsync"}}}, "summary": "Initiate an Asynchronous request to generate text", "description": "This endpoint will immediately return with the UUID of the request for generation.\nThis endpoint will always be accepted, even if there are no workers available currently to fulfill this request.\nPerhaps some will appear in the next 20 minutes.\nAsynchronous requests live for 20 minutes before being considered stale and being deleted.", "operationId": "post_text_async_generate", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/GenerationInputKobold"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/text/pop": {"post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Generation Popped", "schema": {"$ref": "#/definitions/GenerationPayloadKobold"}}}, "summary": "Check if there are generation requests queued for fulfillment", "description": "This endpoint is used by registered workers only", "operationId": "post_text_job_pop", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/PopInputKobold"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/text/status/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Async Request Full Status", "schema": {"$ref": "#/definitions/RequestStatusKobold"}}}, "summary": "Cancel an unfinished request", "description": "This request will include all already generated texts.", "operationId": "delete_text_async_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Async Request Full Status", "schema": {"$ref": "#/definitions/RequestStatusKobold"}}}, "summary": "Retrieve the full status of an Asynchronous generation request", "description": "This request will include all already generated texts.", "operationId": "get_text_async_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/generate/text/submit": {"post": {"responses": {"404": {"description": "Request Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Generation Already Submitted", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Generation Submitted", "schema": {"$ref": "#/definitions/GenerationSubmitted"}}}, "summary": "Submit generated text", "description": "This endpoint is used by registered workers only", "operationId": "post_text_job_submit", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The worker's owner API key."}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SubmitInputKobold"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/interrogate/async": {"post": {"responses": {"429": {"description": "Too Many Prompts", "schema": {"$ref": "#/definitions/RequestError"}}, "503": {"description": "Maintenance Mode", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "202": {"description": "Interrogation Queued", "schema": {"$ref": "#/definitions/RequestInterrogationResponse"}}}, "summary": "Initiate an Asynchronous request to interrogate an image", "description": "This endpoint will immediately return with the UUID of the request for interrogation.\nThis endpoint will always be accepted, even if there are no workers available currently to fulfill this request.\nPerhaps some will appear in the next 20 minutes.\nAsynchronous requests live for 20 minutes before being considered stale and being deleted.", "operationId": "post_interrogate", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A User API key"}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModelInterrogationInputStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/interrogate/pop": {"post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Interrogation Popped", "schema": {"$ref": "#/definitions/InterrogationPopPayload"}}}, "summary": "Check if there are interrogation requests queued for fulfillment", "description": "This endpoint is used by registered workers only", "operationId": "post_interrogate_pop", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/InterrogationPopInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/interrogate/status/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Interrogation Request Status", "schema": {"$ref": "#/definitions/InterrogationStatus"}}}, "summary": "Cancel an unfinished interrogation request", "description": "This request will return all already interrogated image results.", "operationId": "delete_interrogation_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Request Not found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Interrogation Request Status", "schema": {"$ref": "#/definitions/InterrogationStatus"}}}, "summary": "Retrieve the full status of an interrogation request", "description": "This request will include all already generated images.\nAs such, you are requested to not retrieve this endpoint often. Instead use the /check/ endpoint first", "operationId": "get_interrogation_status", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/interrogate/submit": {"post": {"responses": {"404": {"description": "Request Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Generation Already Submitted", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Interrogation Submitted", "schema": {"$ref": "#/definitions/GenerationSubmitted"}}}, "summary": "Submit the results of an interrogated image", "description": "This endpoint is used by registered workers only", "operationId": "post_interrogate_submit", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The worker's owner API key"}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"id": {"type": "string"}, "result": {"type": "string"}, "state": {"type": "string"}}}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/kudos/award": {"post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Kudos Awarded", "schema": {"$ref": "#/definitions/KudosAwarded"}}}, "summary": "Awards Kudos to registed user", "description": "This API can only be used through privileged access.", "operationId": "post_award_kudos", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The sending user's API key."}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"username": {"type": "string"}, "amount": {"type": "integer"}}}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/kudos/transfer": {"post": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Kudos Transferred", "schema": {"$ref": "#/definitions/KudosTransferred"}}}, "summary": "Transfer Kudos to another registed user", "operationId": "post_transfer_kudos", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The sending user's API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"username": {"type": "string"}, "amount": {"type": "integer"}}}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/operations/block_worker_ipaddr/{worker_id}": {"parameters": [{"name": "worker_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Operation Completed", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Remove a worker's IP block", "description": "Only usable by horde moderators", "operationId": "delete_operations_block_worker_ip", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "put": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Operation Completed", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Block worker's from a specific IP for 24 hours", "description": "Only usable by horde moderators", "operationId": "put_operations_block_worker_ip", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/AddWorkerTimeout"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/operations/ipaddr": {"delete": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Operation Completed", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Remove an IP from timeout", "description": "Only usable by horde moderators", "operationId": "delete_operations_ip", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/DeleteTimeoutIPInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "An IP timeout entry", "schema": {"type": "array", "items": {"$ref": "#/definitions/IPTimeout"}}}}, "summary": "Return all existing IP Block timeouts", "operationId": "get_operations_ip", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Operation Completed", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Add an IP or CIDR to timeout", "description": "Only usable by horde moderators", "operationId": "post_operations_ip", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/AddTimeoutIPInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/operations/ipaddr/{ipaddr}": {"parameters": [{"name": "ipaddr", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "IP timeout entries that match IP", "schema": {"type": "array", "items": {"$ref": "#/definitions/IPTimeout"}}}}, "summary": "Check if an IP or CIDR is in timeout", "operationId": "get_operations_ip_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/sharedkeys": {"put": {"responses": {"404": {"description": "Shared Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "SharedKey Details", "schema": {"$ref": "#/definitions/SharedKeyDetails"}}}, "summary": "Create a new SharedKey for this user", "operationId": "put_shared_key", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SharedKeyInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/sharedkeys/{sharedkey_id}": {"parameters": [{"name": "sharedkey_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"404": {"description": "Shared Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Shared Key Details", "schema": {"$ref": "#/definitions/SharedKeyDetails"}}}, "summary": "Modify an existing Shared Key", "operationId": "patch_shared_key_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SharedKeyInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"404": {"description": "Shared Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Shared Key Deleted", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Delete an existing SharedKey for this user", "operationId": "delete_shared_key_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Shared Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Shared Key Details", "schema": {"$ref": "#/definitions/SharedKeyDetails"}}}, "summary": "Get details about an existing Shared Key", "operationId": "get_shared_key_single", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/stats/img/models": {"get": {"responses": {"200": {"description": "AI Power Grid generated images statistics per model", "schema": {"$ref": "#/definitions/ImgModelStats"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}}, "summary": "Details how many images were generated per model for the past day, month and total", "operationId": "get_image_horde_stats_models", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "model_state", "in": "query", "type": "string", "description": "If 'known', only show stats for known models in the model reference. If 'custom' only show stats for custom models. If 'all' shows stats for all models.", "default": "known"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/stats/img/totals": {"get": {"responses": {"200": {"description": "AI Power Grid generated images statistics", "schema": {"$ref": "#/definitions/StatsImgTotals"}}}, "summary": "Details how many images have been generated in the past minux,hour,day,month and total", "description": "Also shows the amount of pixelsteps for the same timeframe.", "operationId": "get_image_horde_stats_totals", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/stats/text/models": {"get": {"responses": {"200": {"description": "AI Power Grid generated text statistics per model", "schema": {"$ref": "#/definitions/TxtModelStats"}}}, "summary": "Details how many texts were generated per model for the past day, month and total", "operationId": "get_text_horde_stats_models", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/stats/text/totals": {"get": {"responses": {"200": {"description": "AI Power Grid generated text statistics", "schema": {"$ref": "#/definitions/StatsTxtTotals"}}}, "summary": "Details how many texts have been generated in the past minux,hour,day,month and total", "description": "Also shows the amount of pixelsteps for the same timeframe.", "operationId": "get_text_horde_stats_totals", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/status/heartbeat": {"get": {"responses": {"200": {"description": "Success"}}, "summary": "If this loads, this node is available", "description": "Includes some other metrics to gauge the health of this node", "operationId": "get_heartbeat", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}], "tags": ["v2"]}}, "/v2/status/models": {"get": {"responses": {"200": {"description": "List All Active Models", "schema": {"type": "array", "items": {"$ref": "#/definitions/ActiveModel"}}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}}, "summary": "Returns a list of models active currently in this horde", "operationId": "get_models", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "type", "in": "query", "type": "string", "description": "Filter the models by type (image or text).", "default": "image"}, {"name": "min_count", "in": "query", "type": "integer", "description": "Filter only models that have at least this amount of threads serving."}, {"name": "max_count", "in": "query", "type": "integer", "description": "Filter the models that have at most this amount of threads serving."}, {"name": "model_state", "in": "query", "type": "string", "description": "If 'known', only show stats for known models in the model reference. If 'custom' only show stats for custom models. If 'all' shows stats for all models.", "default": "all"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/status/models/{model_name}": {"parameters": [{"name": "model_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Lists specific model stats", "schema": {"type": "array", "items": {"$ref": "#/definitions/ActiveModel"}}}}, "summary": "Returns all the statistics of a specific model in this horde", "operationId": "get_model_single", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/status/modes": {"get": {"responses": {"200": {"description": "AI Power Grid Maintenance", "schema": {"$ref": "#/definitions/HordeModes"}}}, "summary": "Horde Maintenance Mode Status", "description": "Use this endpoint to quicky determine if this horde is in maintenance, invite_only or raid mode.", "operationId": "get_horde_modes", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Admin or Owner API key."}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "put": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Maintenance Mode Set", "schema": {"$ref": "#/definitions/HordeModes"}}}, "summary": "Change Horde Modes", "description": "Endpoint for admins to (un)set the horde into maintenance, invite_only or raid modes.", "operationId": "put_horde_modes", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The Admin API key."}, {"name": "payload", "required": true, "in": "body", "schema": {"type": "object", "properties": {"maintenance_mode": {"type": "boolean"}, "invite_only_mode": {"type": "boolean"}, "raid_mode": {"type": "boolean"}}}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/status/news": {"get": {"responses": {"200": {"description": "AI Power Grid News", "schema": {"type": "array", "items": {"$ref": "#/definitions/Newspiece"}}}}, "summary": "Read the latest happenings on the horde", "operationId": "get_horde_news", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/status/performance": {"get": {"responses": {"200": {"description": "AI Power Grid Performance", "schema": {"$ref": "#/definitions/HordePerformance"}}}, "summary": "Details about the current performance of this Horde", "operationId": "get_horde_load", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/image": {"get": {"responses": {"200": {"description": "Lists image styles information", "schema": {"type": "array", "items": {"$ref": "#/definitions/StyleStable"}}}}, "summary": "Retrieves information about all image styles", "description": "Can be filtered based on model or tags", "operationId": "get_image_style", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "sort", "in": "query", "type": "string", "description": "How to sort returned styles. 'popular' sorts by usage and 'age' sorts by date added.", "default": "popular"}, {"name": "page", "in": "query", "type": "integer", "description": "Which page of results to return. Each page has 25 styles.", "default": 1}, {"name": "tag", "in": "query", "type": "string", "description": "If included, will only return styles with this tag"}, {"name": "model", "in": "query", "type": "string", "description": "If included, will only return styles using this model"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Added", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Creates a new image style", "operationId": "post_image_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModelStyleInputStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/image/{style_id}": {"parameters": [{"name": "style_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Updated", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Modifies an image style", "operationId": "patch_single_image_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModelStylePatchStable"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Deleted", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Deletes an image style", "operationId": "delete_single_image_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"200": {"description": "Lists image styles information", "schema": {"$ref": "#/definitions/StyleStable"}}}, "summary": "Displays information about an image style", "operationId": "get_single_image_style", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/image/{style_id}/example": {"parameters": [{"name": "style_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Example Added", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Creates an image style example", "operationId": "post_image_style_example", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A User API key"}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/InputStyleExamplePost"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/image/{style_id}/example/{example_id}": {"parameters": [{"name": "style_id", "in": "path", "required": true, "type": "string"}, {"name": "example_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Example Modified", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Modified an existing image style example", "operationId": "patch_single_image_style_example", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A User API key"}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/InputStyleExamplePost"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Example Deleted", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Deletes an image style example", "operationId": "delete_single_image_style_example", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/image_by_name/{style_name}": {"parameters": [{"name": "style_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Lists image style information by name", "schema": {"$ref": "#/definitions/StyleStable"}}}, "summary": "Seeks an image style by name and displays its information", "operationId": "get_single_image_style_by_name", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/text": {"get": {"responses": {"200": {"description": "Lists text styles information", "schema": {"type": "array", "items": {"$ref": "#/definitions/StyleKobold"}}}}, "summary": "Retrieves information about all text styles", "description": "Can be filtered based on model or tags", "operationId": "get_text_style", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "sort", "in": "query", "type": "string", "description": "How to sort returned styles. 'popular' sorts by usage and 'age' sorts by date added.", "default": "popular"}, {"name": "page", "in": "query", "type": "integer", "description": "Which page of results to return. Each page has 25 styles.", "default": 1}, {"name": "tag", "in": "query", "type": "string", "description": "If included, will only return styles with this tag"}, {"name": "model", "in": "query", "type": "string", "description": "If included, will only return styles using this model"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Added", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Creates a new text style", "operationId": "post_text_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModelStyleInputKobold"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/text/{style_id}": {"parameters": [{"name": "style_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Updated", "schema": {"$ref": "#/definitions/StyleModify"}}}, "summary": "Modifies a text style", "operationId": "patch_single_text_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The API Key corresponding to a registered user."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModelStylePatchKobold"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestValidationError"}}, "200": {"description": "Style Deleted", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Deletes a text style", "operationId": "delete_single_text_style", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A mod API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"200": {"description": "Lists text styles information", "schema": {"$ref": "#/definitions/StyleKobold"}}}, "summary": "Displays information about a single text style", "operationId": "get_single_text_style", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/styles/text_by_name/{style_name}": {"parameters": [{"name": "style_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Lists text style information by name", "schema": {"$ref": "#/definitions/StyleKobold"}}}, "summary": "Seeks a text style by name and displays its information", "operationId": "get_single_image_style_by_name", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/teams": {"get": {"responses": {"200": {"description": "Teams List", "schema": {"type": "array", "items": {"$ref": "#/definitions/TeamDetails"}}}}, "summary": "A List with the details of all teams", "operationId": "get_teams", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Create Team", "schema": {"$ref": "#/definitions/ModifyTeam"}}}, "summary": "Create a new team", "description": "Only trusted users can create new teams.", "operationId": "post_teams", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "A User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/CreateTeamInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/teams/{team_id}": {"parameters": [{"name": "team_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"404": {"description": "Team Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Modify Team", "schema": {"$ref": "#/definitions/ModifyTeam"}}}, "summary": "Update a Team's information", "operationId": "patch_team_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Creator API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModifyTeamInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "delete": {"responses": {"404": {"description": "Team Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Delete Team", "schema": {"$ref": "#/definitions/DeletedTeam"}}}, "summary": "Delete the team entry", "description": "Only the team's creator or a horde moderator can use this endpoint.\nThis action is unrecoverable!", "operationId": "delete_team_single", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Owner API key."}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Team Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Team Details", "schema": {"$ref": "#/definitions/TeamDetails"}}}, "summary": "Details of a worker Team", "operationId": "get_team_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/users": {"get": {"responses": {"200": {"description": "Users List", "schema": {"$ref": "#/definitions/UserDetails"}}}, "summary": "A List with the details and statistic of all registered users", "operationId": "get_users", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "page", "in": "query", "type": "integer", "description": "Which page of results to return. Each page has 25 users.", "default": 1}, {"name": "sort", "in": "query", "type": "string", "description": "How to sort the returned list.", "default": "kudos"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/users/{user_id}": {"parameters": [{"name": "user_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "User Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "User Details", "schema": {"$ref": "#/definitions/UserDetails"}}}, "summary": "Details and statistics about a specific user", "operationId": "get_user_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Admin, Mod or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "put": {"responses": {"404": {"description": "Worker Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Modify User", "schema": {"$ref": "#/definitions/ModifyUser"}}}, "summary": "Endpoint for horde admins to perform operations on users", "operationId": "put_user_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The Admin API ."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModifyUserInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/workers": {"get": {"responses": {"200": {"description": "Workers List", "schema": {"type": "array", "items": {"$ref": "#/definitions/WorkerDetails"}}}}, "summary": "A List with the details of all registered and active workers", "operationId": "get_workers", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "A Moderator API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "type", "in": "query", "type": "string", "description": "Filter the workers by type (image, text or interrogation)."}, {"name": "name", "in": "query", "type": "string", "description": "Find a worker by name (case insensitive)."}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/workers/messages": {"get": {"responses": {"404": {"description": "API Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Forbidden", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Worker Message Details", "schema": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelMessage"}}}}, "summary": "List Worker Messages", "operationId": "get_worker_messages", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "user_id", "in": "query", "type": "string", "description": "Filter the messages by user id (numerical). If user is not moderator, they can only see their own messages."}, {"name": "worker_id", "in": "query", "type": "string", "description": "Filter the messages by worker id (numerical)."}, {"name": "validity", "in": "query", "type": "string", "description": "Filter messages based on whether they're expired or not. Possible values are 'active', 'expired' and 'all", "default": "active"}, {"name": "page", "in": "query", "type": "integer", "description": "Which page of results to return. Each page has 50 messages.", "default": 1}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "post": {"responses": {"404": {"description": "API Key Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Forbidden", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Create Worker Message", "schema": {"$ref": "#/definitions/ResponseModelMessage"}}}, "summary": "Create New Worker Message", "operationId": "post_worker_messages", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ResponseModelMessage"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/workers/messages/{message_id}": {"parameters": [{"name": "message_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"200": {"description": "Delete Worker Message", "schema": {"$ref": "#/definitions/SimpleResponse"}}}, "summary": "Delete a Worker Message", "operationId": "delete_single_worker_message", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "User API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"200": {"description": "Worker Message Details", "schema": {"$ref": "#/definitions/ResponseModelMessage"}}}, "summary": "Display a Worker Message", "operationId": "get_single_worker_message", "parameters": [{"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/workers/name/{worker_name}": {"parameters": [{"name": "worker_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "Worker Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Worker Details", "schema": {"$ref": "#/definitions/WorkerDetails"}}}, "summary": "Details of a registered worker", "description": "Can retrieve the details of a worker even if inactive\n(A worker is considered inactive if it has not checked in for 5 minutes)", "operationId": "get_worker_single_name", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}, "/v2/workers/{worker_id}": {"parameters": [{"name": "worker_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Worker Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Delete Worker", "schema": {"$ref": "#/definitions/DeletedWorker"}}}, "summary": "Delete the worker entry", "description": "This will delete the worker and their statistics. Will not affect the kudos generated by that worker for their owner.\nOnly the worker's owner and an admin can use this endpoint.\nThis action is unrecoverable!", "operationId": "delete_worker_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "get": {"responses": {"404": {"description": "Worker Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Worker Details", "schema": {"$ref": "#/definitions/WorkerDetails"}}}, "summary": "Details of a registered worker", "description": "Can retrieve the details of a worker even if inactive\n(A worker is considered inactive if it has not checked in for 5 minutes)", "operationId": "get_worker_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "description": "The Moderator or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}, "put": {"responses": {"404": {"description": "Worker Not Found", "schema": {"$ref": "#/definitions/RequestError"}}, "403": {"description": "Access Denied", "schema": {"$ref": "#/definitions/RequestError"}}, "401": {"description": "Invalid API Key", "schema": {"$ref": "#/definitions/RequestError"}}, "400": {"description": "Validation Error", "schema": {"$ref": "#/definitions/RequestError"}}, "200": {"description": "Modify Worker", "schema": {"$ref": "#/definitions/ModifyWorker"}}}, "operationId": "put_worker_single", "parameters": [{"name": "apikey", "in": "header", "type": "string", "required": true, "description": "The Moderator or Owner API key."}, {"name": "Client-Agent", "in": "header", "type": "string", "description": "The client name and version.", "default": "unknown:0:unknown"}, {"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ModifyWorkerInput"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v2"]}}}, "info": {"title": "AI Power Grid", "version": "2.5", "description": "The API documentation for the AI Power Grid"}, "produces": ["application/json"], "consumes": ["application/json"], "tags": [{"name": "v2", "description": "API Version 2"}], "definitions": {"GenerationInputStable": {"required": ["prompt"], "properties": {"prompt": {"type": "string", "description": "The prompt which will be sent to Stable Diffusion to generate an image.", "minLength": 1}, "params": {"$ref": "#/definitions/ModelGenerationInputStable"}, "nsfw": {"type": "boolean", "description": "Set to true if this request is NSFW. This will skip workers which censor images.", "default": false}, "trusted_workers": {"type": "boolean", "description": "When true, only trusted workers will serve this request. When False, Evaluating workers will also be used which can increase speed but adds more risk!", "default": false}, "validated_backends": {"type": "boolean", "description": "When true, only inference backends that are validated by the AI Power Grid devs will serve this request. When False, non-validated backends will also be used which can increase speed but you may end up with unexpected results.", "default": true}, "slow_workers": {"type": "boolean", "description": "When True, allows slower workers to pick up this request. Disabling this incurs an extra kudos cost.", "default": true}, "extra_slow_workers": {"type": "boolean", "description": "When True, allows very slower workers to pick up this request. Use this when you don't mind waiting a lot.", "default": false}, "censor_nsfw": {"type": "boolean", "description": "If the request is SFW, and the worker accidentally generates NSFW, it will send back a censored image.", "default": false}, "workers": {"type": "array", "items": {"type": "string", "description": "Specify up to 5 workers which are allowed to service this request."}}, "worker_blacklist": {"type": "boolean", "description": "If true, the worker list will be treated as a blacklist instead of a whitelist.", "default": false}, "models": {"type": "array", "items": {"type": "string", "description": "Specify which models are allowed to be used for this request."}}, "source_image": {"type": "string", "description": "The Base64-encoded webp to use for img2img."}, "source_processing": {"type": "string", "description": "Generation mode. For images: txt2img, img2img, inpainting, outpainting, remix. For video: txt2video, img2video.", "default": "txt2img", "example": "txt2img", "enum": ["txt2img", "img2img", "inpainting", "outpainting", "remix", "txt2video", "img2video"]}, "media_type": {"type": "string", "description": "Media type being generated. Auto-detected from model if not specified.", "default": "image", "example": "image", "enum": ["image", "video"]}, "source_mask": {"type": "string", "description": "If source_processing is set to 'inpainting' or 'outpainting', this parameter can be optionally provided as the  Base64-encoded webp mask of the areas to inpaint. If this arg is not passed, the inpainting/outpainting mask has to be embedded as alpha channel."}, "extra_source_images": {"type": "array", "items": {"$ref": "#/definitions/ExtraSourceImage"}}, "r2": {"type": "boolean", "description": "If True, the image will be sent via cloudflare r2 download link.", "default": true}, "shared": {"type": "boolean", "description": "If True, The image will be shared with LAION for improving their dataset. This will also reduce your kudos consumption by 2. For anonymous users, this is always True.", "default": false}, "replacement_filter": {"type": "boolean", "description": "If enabled, suspicious prompts are sanitized through a string replacement filter instead.", "default": true}, "dry_run": {"type": "boolean", "description": "When true, the endpoint will simply return the cost of the request in kudos and exit.", "default": false}, "proxied_account": {"type": "string", "description": "If using a service account as a proxy, provide this value to identify the actual account from which this request is coming from."}, "disable_batching": {"type": "boolean", "description": "When true, This request will not use batching. This will allow you to retrieve accurate seeds. Feature is restricted to Trusted users and Patreons.", "default": false}, "allow_downgrade": {"type": "boolean", "description": "When true and the request requires upfront kudos and the account does not have enough The request will be downgraded in steps and resolution so that it does not need upfront kudos.", "default": false}, "webhook": {"type": "string", "description": "Provide a URL where the AI Power Grid will send a POST call after each delivered generation. The request will include the details of the job as well as the request ID.", "example": "https://haidra.net/00000000-0000-0000-0000-000000000000", "minLength": 10, "maxLength": 2048}, "style": {"type": "string", "description": "A horde style ID or name to use for this generation", "example": "00000000-0000-0000-0000-000000000000", "minLength": 3, "maxLength": 2048}, "wallet_id": {"type": "string", "description": "EVM wallet address to associate with this generation for gallery tracking.", "example": "0xe2dddDDf4dD22e98265BBf0E6bDC1cB3A4Bb26a8", "maxLength": 42}}, "type": "object"}, "ModelGenerationInputStable": {"allOf": [{"$ref": "#/definitions/ModelPayloadRootStable"}, {"properties": {"steps": {"type": "integer", "default": 30, "minimum": 1, "maximum": 500}, "n": {"type": "integer", "description": "The amount of images to generate.", "default": 1, "minimum": 1, "maximum": 20}}, "type": "object"}]}, "ModelPayloadRootStable": {"allOf": [{"$ref": "#/definitions/ModelPayloadStyleStable"}, {"properties": {"seed": {"type": "string", "description": "The seed to use to generate this request. You can pass text as well as numbers.", "example": "The little seed that could"}, "seed_variation": {"type": "integer", "description": "If passed with multiple n, the provided seed will be incremented every time by this value.", "example": 1, "minimum": 1, "maximum": 1000}, "control_type": {"type": "string", "example": "canny", "enum": ["canny", "hed", "depth", "normal", "openpose", "seg", "scribble", "fakescribbles", "hough"]}, "image_is_control": {"type": "boolean", "description": "Set to True if the image submitted is a pre-generated control map for ControlNet use.", "default": false}, "return_control_map": {"type": "boolean", "description": "Set to True if you want the ControlNet map returned instead of a generated image.", "default": false}, "extra_texts": {"type": "array", "items": {"$ref": "#/definitions/ExtraText"}}}, "type": "object"}]}, "ModelPayloadStyleStable": {"properties": {"sampler_name": {"type": "string", "default": "k_euler_a", "example": "k_euler_a", "enum": ["k_euler_a", "k_dpm_2", "k_dpm_adaptive", "k_dpmpp_2s_a", "k_dpm_fast", "k_euler", "lcm", "dpmsolver", "k_lms", "DDIM", "k_dpmpp_2m", "k_heun", "k_dpmpp_sde", "k_dpm_2_a"]}, "cfg_scale": {"type": "number", "default": 7.5, "minimum": 0, "maximum": 100}, "denoising_strength": {"type": "number", "example": 0.75, "minimum": 0.01, "maximum": 1.0}, "hires_fix_denoising_strength": {"type": "number", "example": 0.75, "minimum": 0.01, "maximum": 1.0}, "height": {"type": "integer", "description": "The height of the image to generate.", "default": 512, "minimum": 64, "maximum": 3072, "multipleOf": 64}, "width": {"type": "integer", "description": "The width of the image to generate.", "default": 512, "minimum": 64, "maximum": 3072, "multipleOf": 64}, "post_processing": {"type": "array", "uniqueItems": true, "items": {"type": "string", "description": "The list of post-processors to apply to the image, in the order to be applied.", "example": "GFPGAN", "enum": ["GFPGAN", "RealESRGAN_x4plus", "RealESRGAN_x2plus", "RealESRGAN_x4plus_anime_6B", "NMKD_Siax", "4x_AnimeSharp", "CodeFormers", "strip_background"]}}, "karras": {"type": "boolean", "description": "Set to True to enable karras noise scheduling tweaks.", "default": false}, "tiling": {"type": "boolean", "description": "Set to True to create images that stitch together seamlessly.", "default": false}, "hires_fix": {"type": "boolean", "description": "Set to True to process the image at base resolution before upscaling and re-processing or to use Stable Cascade 2-pass.", "default": false}, "clip_skip": {"type": "integer", "description": "The number of CLIP language processor layers to skip.", "example": 1, "minimum": 1, "maximum": 12}, "facefixer_strength": {"type": "number", "example": 0.75, "minimum": 0, "maximum": 1.0}, "loras": {"type": "array", "items": {"$ref": "#/definitions/ModelPayloadLorasStable"}}, "tis": {"type": "array", "items": {"$ref": "#/definitions/ModelPayloadTextualInversionsStable"}}, "special": {"$ref": "#/definitions/ModelSpecialPayloadStable"}, "workflow": {"type": "string", "description": "Explicitly specify the horde-engine workflow to use.", "example": "qr_code", "enum": ["qr_code"]}, "transparent": {"type": "boolean", "description": "Set to True to generate the image using Layer Diffuse, creating an image with a transparent background.", "default": false}}, "type": "object"}, "ModelPayloadLorasStable": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The exact name or CivitAI Model Page ID of the LoRa. If is_version is true, this should be the CivitAI version ID.", "example": "Magnagothica", "minLength": 1, "maxLength": 255}, "model": {"type": "number", "description": "The strength of the LoRa to apply to the SD model.", "default": 1.0, "minimum": -5.0, "maximum": 5.0}, "clip": {"type": "number", "description": "The strength of the LoRa to apply to the clip model.", "default": 1.0, "minimum": -5.0, "maximum": 5.0}, "inject_trigger": {"type": "string", "description": "If set, will try to discover a trigger for this LoRa which matches or is similar to this string and inject it into the prompt. If 'any' is specified it will be pick the first trigger.", "minLength": 1, "maxLength": 30}, "is_version": {"type": "boolean", "description": "If true, will consider the LoRa ID as a CivitAI version ID and search accordingly. Ensure the name is an integer.", "default": false}}, "type": "object"}, "ModelPayloadTextualInversionsStable": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The exact name or CivitAI ID of the Textual Inversion.", "example": "7808", "minLength": 1, "maxLength": 255}, "inject_ti": {"type": "string", "description": "If set, Will automatically add this TI filename to the prompt or negative prompt accordingly using the provided strength. If this is set to None, then the user will have to manually add the embed to the prompt themselves.", "example": "prompt", "enum": ["prompt", "negprompt"]}, "strength": {"type": "number", "description": "The strength with which to apply the TI to the prompt. Only used when inject_ti is not None", "default": 1.0, "minimum": -5.0, "maximum": 5.0}}, "type": "object"}, "ModelSpecialPayloadStable": {"properties": {"*": {"type": "object", "additionalProperties": {"type": "object"}}}, "type": "object"}, "ExtraText": {"properties": {"text": {"type": "string", "description": "The extra text to send along with this generation.", "minLength": 1}, "reference": {"type": "string", "description": "The reference which points how and where this text should be used.", "minLength": 3}}, "type": "object"}, "ExtraSourceImage": {"properties": {"image": {"type": "string", "description": "The Base64-encoded webp to use for further processing.", "minLength": 1}, "strength": {"type": "number", "description": "Optional field, determining the strength to use for the processing", "default": 1.0}}, "type": "object"}, "RequestError": {"required": ["rc"], "properties": {"message": {"type": "string", "description": "The error message for this status code."}, "rc": {"type": "string", "description": "The return code for this error. See: https://github.com/Haidra-Org/AI-Horde/blob/main/README_return_codes.md", "example": "ExampleHordeError", "enum": ["MissingPrompt", "CorruptPrompt", "KudosValidationError", "NoValidActions", "InvalidSize", "InvalidPromptSize", "TooManySteps", "Profanity", "ProfaneWorkerName", "ProfaneBridgeAgent", "ProfaneWorkerInfo", "ProfaneUserName", "ProfaneUserContact", "ProfaneAdminComment", "ProfaneTeamName", "ProfaneTeamInfo", "TooLong", "TooLongWorkerName", "TooLongUserName", "NameAlreadyExists", "WorkerNameAlreadyExists", "TeamNameAlreadyExists", "PolymorphicNameConflict", "ImageValidationFailed", "SourceImageResolutionExceeded", "SourceImageSizeExceeded", "SourceImageUrlInvalid", "SourceImageUnreadable", "InpaintingMissingMask", "SourceMaskUnnecessary", "UnsupportedSampler", "UnsupportedModel", "ControlNetUnsupported", "ControlNetSourceMissing", "ControlNetInvalidPayload", "SourceImageRequiredForModel", "UnexpectedModelName", "TooManyUpscalers", "ProcGenNotFound", "InvalidAestheticAttempt", "AestheticsNotCompleted", "AestheticsNotPublic", "AestheticsDuplicate", "AestheticsMissing", "AestheticsSolo", "AestheticsConfused", "AestheticsAlreadyExist", "AestheticsServerRejected", "AestheticsServerError", "AestheticsServerDown", "AestheticsServerTimeout", "InvalidAPIKey", "WrongCredentials", "NotAdmin", "NotModerator", "NotOwner", "NotPrivileged", "AnonForbidden", "AnonForbiddenWorker", "AnonForbiddenUserMod", "NotTrusted", "UntrustedTeamCreation", "UntrustedUnsafeIP", "WorkerMaintenance", "WorkerFlaggedMaintenance", "TooManySameIPs", "WorkerInviteOnly", "UnsafeIP", "TimeoutIP", "TooManyNewIPs", "KudosUpfront", "SharedKeyInvalid", "SharedKeyEmpty", "SharedKeyExpired", "SharedKeyInsufficientKudos", "SharedKeyAssignedStyles", "InvalidJobID", "RequestNotFound", "WorkerNotFound", "TeamNotFound", "FilterNotFound", "UserNotFound", "DuplicateGen", "AbortedGen", "RequestExpired", "TooManyPrompts", "NoValidWorkers", "MaintenanceMode", "TargetAccountFlagged", "SourceAccountFlagged", "FaultWhenKudosReceiving", "FaultWhenKudosSending", "TooFastKudosTransfers", "KudosTransferToAnon", "KudosTransferToSelf", "KudosTransferNotEnough", "NegativeKudosTransfer", "KudosTransferFromAnon", "InvalidAwardUsername", "KudosAwardToAnon", "NotAllowedAwards", "NoWorkerModSelected", "NoUserModSelected", "NoHordeModSelected", "NoTeamModSelected", "NoFilterModSelected", "NoSharedKeyModSelected", "BadRequest", "Forbidden", "Locked", "ControlNetMismatch", "HiResFixMismatch", "TooManyLoras", "BadLoraVersion", "TooManyTIs", "BetaAnonForbidden", "BetaComparisonFault", "BadCFGDecimals", "BadCFGNumber", "BadClientAgent", "SpecialMissingPayload", "SpecialForbidden", "SpecialMissingUsername", "SpecialModelNeedsSpecialUser", "SpecialFieldNeedsSpecialUser", "Img2ImgMismatch", "TilingMismatch", "EducationCannotSendKudos", "InvalidPriorityUsername", "OnlyServiceAccountProxy", "RequiresTrust", "InvalidRemixModel", "InvalidExtraSourceImages", "TooManyExtraSourceImages", "MissingFullSamplerOrder", "TooManyStopSequences", "ExcessiveStopSequence", "TokenOverflow", "MoreThanMinExtraSourceImage", "InvalidExtraTexts", "MissingExtraTexts", "InvalidTransparencyModel", "InvalidTransparencyImg2Img", "InvalidTransparencyCN", "HiResMismatch", "StylesAnonForbidden", "StylePromptMissingVars", "StylesRequiresCustomizer", "StyleMismatch", "StyleGetMistmatch", "TooManyStyleExamples", "ExampleURLAlreadyInUse", "MessagesOnlyOwnWorkers"]}}, "type": "object"}, "RequestValidationError": {"allOf": [{"$ref": "#/definitions/RequestError"}, {"properties": {"errors": {"type": "object", "additionalProperties": {"type": "string", "description": "The details of the validation error"}}}, "type": "object"}]}, "RequestAsync": {"properties": {"id": {"type": "string", "description": "The UUID of the request. Use this to retrieve the request status in the future."}, "kudos": {"type": "number", "description": "The expected kudos consumption for this request."}, "message": {"type": "string", "description": "Any extra information from the horde about this request."}, "warnings": {"type": "array", "items": {"$ref": "#/definitions/RequestSingleWarning"}}}, "type": "object"}, "RequestSingleWarning": {"properties": {"code": {"type": "string", "description": "A unique identifier for this warning.", "example": "NoAvailableWorker", "enum": ["NoAvailableWorker", "ClipSkipMismatch", "StepsTooFew", "StepsTooMany", "CfgScaleMismatch", "CfgScaleTooSmall", "CfgScaleTooLarge", "SamplerMismatch", "SchedulerMismatch"]}, "message": {"type": "string", "description": "Something that you should be aware about this request, in plain text.", "minLength": 1}}, "type": "object"}, "RequestStatusStable": {"allOf": [{"$ref": "#/definitions/RequestStatusCheck"}, {"properties": {"generations": {"type": "array", "items": {"$ref": "#/definitions/GenerationStable"}}, "shared": {"type": "boolean", "description": "If True, These images have been shared with LAION."}}, "type": "object"}]}, "RequestStatusCheck": {"properties": {"finished": {"type": "integer", "description": "The amount of finished jobs in this request."}, "processing": {"type": "integer", "description": "The amount of still processing jobs in this request."}, "restarted": {"type": "integer", "description": "The amount of jobs that timed out and had to be restarted or were reported as failed by a worker."}, "waiting": {"type": "integer", "description": "The amount of jobs waiting to be picked up by a worker."}, "done": {"type": "boolean", "description": "True when all jobs in this request are done. Else False."}, "faulted": {"type": "boolean", "description": "True when this request caused an internal server error and could not be completed.", "default": false}, "wait_time": {"type": "integer", "description": "The expected amount to wait (in seconds) to generate all jobs in this request."}, "queue_position": {"type": "integer", "description": "The position in the requests queue. This position is determined by relative Kudos amounts."}, "kudos": {"type": "number", "description": "The amount of total Kudos this request has consumed until now."}, "is_possible": {"type": "boolean", "description": "If False, this request will not be able to be completed with the pool of workers currently available.", "default": true}}, "type": "object"}, "GenerationStable": {"allOf": [{"$ref": "#/definitions/Generation"}, {"properties": {"img": {"type": "string", "title": "Generated Image", "description": "The generated image as a Base64-encoded .webp file."}, "seed": {"type": "string", "title": "Generation Seed", "description": "The seed which generated this image."}, "id": {"type": "string", "title": "Generation ID", "description": "The ID for this image."}, "censored": {"type": "boolean", "description": "When true this image has been censored by the worker's safety filter."}, "gen_metadata": {"type": "array", "items": {"$ref": "#/definitions/GenerationMetadataStable"}}}, "type": "object"}]}, "Generation": {"required": ["state"], "properties": {"worker_id": {"type": "string", "title": "Worker ID", "description": "The UUID of the worker which generated this image.", "minLength": 36, "maxLength": 36}, "worker_name": {"type": "string", "title": "Worker Name", "description": "The name of the worker which generated this image."}, "model": {"type": "string", "title": "Generation Model", "description": "The model which generated this image."}, "state": {"type": "string", "title": "Generation State", "description": "OBSOLETE (Use the gen_metadata field). The state of this generation.", "default": "ok", "example": "ok", "enum": ["ok", "censored"]}}, "type": "object"}, "GenerationMetadataStable": {"required": ["type", "value"], "properties": {"type": {"type": "string", "description": "The relevance of the metadata field", "example": "lora", "enum": ["lora", "ti", "censorship", "source_image", "source_mask", "extra_source_images", "batch_index", "information"]}, "value": {"type": "string", "description": "The value of the metadata field", "example": "download_failed", "enum": ["download_failed", "parse_failed", "baseline_mismatch", "csam", "nsfw", "see_ref"]}, "ref": {"type": "string", "description": "Optionally a reference for the metadata (e.g. a lora ID)", "maxLength": 255}}, "type": "object"}, "AestheticsPayload": {"properties": {"best": {"type": "string", "description": "The UUID of the best image in this generation batch (only used when 2+ images generated). If 2+ aesthetic ratings are also provided, then they take precedence if they're not tied.", "example": "6038971e-f0b0-4fdd-a3bb-148f561f815e", "minLength": 36, "maxLength": 36}, "ratings": {"type": "array", "items": {"$ref": "#/definitions/AestheticRating"}}}, "type": "object"}, "AestheticRating": {"required": ["id", "rating"], "properties": {"id": {"type": "string", "description": "The UUID of image being rated.", "example": "6038971e-f0b0-4fdd-a3bb-148f561f815e", "minLength": 36, "maxLength": 36}, "rating": {"type": "integer", "description": "The aesthetic rating 1-10 for this image.", "minimum": 1, "maximum": 10}, "artifacts": {"type": "integer", "description": "The artifacts rating for this image.\n0 for flawless generation that perfectly fits to the prompt.\n1 for small, hardly recognizable flaws.\n2 small flaws that can easily be spotted, but don not harm the aesthetic experience.\n3 for flaws that look obviously wrong, but only mildly harm the aesthetic experience.\n4 for flaws that look obviously wrong & significantly harm the aesthetic experience.\n5 for flaws that make the image look like total garbage.", "example": 1, "minimum": 0, "maximum": 5}}, "type": "object"}, "GenerationSubmitted": {"properties": {"reward": {"type": "number", "description": "The amount of kudos gained for submitting this request.", "example": 10.0}}, "type": "object"}, "PopInputStable": {"allOf": [{"$ref": "#/definitions/PopInput"}, {"properties": {"max_pixels": {"type": "integer", "description": "The maximum amount of pixels this worker can generate.", "default": 262144}, "blacklist": {"type": "array", "items": {"type": "string", "description": "Words which, when detected will refuste to pick up any jobs."}}, "allow_img2img": {"type": "boolean", "description": "If True, this worker will pick up img2img requests.", "default": true}, "allow_painting": {"type": "boolean", "description": "If True, this worker will pick up inpainting/outpainting requests.", "default": true}, "allow_unsafe_ipaddr": {"type": "boolean", "description": "If True, this worker will pick up img2img requests coming from clients with an unsafe IP.", "default": true}, "allow_post_processing": {"type": "boolean", "description": "If True, this worker will pick up requests requesting post-processing.", "default": true}, "allow_controlnet": {"type": "boolean", "description": "If True, this worker will pick up requests requesting ControlNet.", "default": true}, "allow_sdxl_controlnet": {"type": "boolean", "description": "If True, this worker will pick up requests requesting SDXL ControlNet.", "default": true}, "allow_lora": {"type": "boolean", "description": "If True, this worker will pick up requests requesting LoRas.", "default": true}, "limit_max_steps": {"type": "boolean", "description": "If True, This worker will not pick up jobs with more steps than the average allowed for that model. this is for use by workers which might run into issues doing too many steps.", "default": true}}, "type": "object"}]}, "PopInput": {"properties": {"name": {"type": "string", "description": "The Name of the Worker."}, "priority_usernames": {"type": "array", "items": {"type": "string", "description": "Users with priority to use this worker."}}, "nsfw": {"type": "boolean", "description": "Whether this worker can generate NSFW requests or not.", "default": false}, "models": {"type": "array", "items": {"type": "string", "description": "Which models this worker is serving.", "minLength": 3, "maxLength": 255}}, "bridge_agent": {"type": "string", "description": "The worker name, version and website.", "default": "unknown:0:unknown", "example": "AI Power Grid Worker reGen:4.1.0:https://github.com/Haidra-Org/horde-worker-reGen", "maxLength": 1000}, "threads": {"type": "integer", "description": "How many threads this worker is running. This is used to accurately the current power available in the horde.", "default": 1, "minimum": 1, "maximum": 50}, "require_upfront_kudos": {"type": "boolean", "description": "If True, this worker will only pick up requests where the owner has the required kudos to consume already available.", "default": false, "example": false}, "amount": {"type": "integer", "description": "How many jobvs to pop at the same time", "default": 1, "minimum": 1, "maximum": 20}, "extra_slow_worker": {"type": "boolean", "description": "If True, marks the worker as very slow. You should only use this if your mps/s is lower than 0.1.Extra slow workers are excluded from normal requests but users can opt in to use them.", "default": true}, "wallet_address": {"type": "string", "description": "EVM wallet address for Web3 rewards tracking (0x...)", "example": "0x1234567890123456789012345678901234567890"}}, "type": "object"}, "GenerationPayloadStable": {"properties": {"payload": {"$ref": "#/definitions/ModelPayloadStable"}, "id": {"type": "string", "description": "The UUID for this image generation."}, "ids": {"type": "array", "items": {"type": "string", "description": "The UUID for this image generation.", "example": "00000000-0000-0000-0000-000000000000"}}, "messages": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelMessagePop"}}, "ttl": {"type": "integer", "description": "The amount of seconds before this job is considered stale and aborted."}, "skipped": {"$ref": "#/definitions/NoValidRequestFoundStable"}, "model": {"type": "string", "description": "Which of the available models to use for this request."}, "source_image": {"type": "string", "description": "For img2img: HTTP/HTTPS URL (core fetches), data URL (data:image/png;base64,...), or raw base64."}, "source_processing": {"type": "string", "description": "Generation mode. For images: txt2img, img2img, inpainting, outpainting, remix. For video: txt2video, img2video.", "default": "txt2img", "example": "txt2img", "enum": ["txt2img", "img2img", "inpainting", "outpainting", "remix", "txt2video", "img2video"]}, "media_type": {"type": "string", "description": "Media type being generated. Auto-detected from model if not specified.", "default": "image", "example": "image", "enum": ["image", "video"]}, "source_mask": {"type": "string", "description": "If source_processing is set to 'inpainting' or 'outpainting', this parameter can be optionally provided as the mask of the areas to inpaint. If this arg is not passed, the inpainting/outpainting mask has to be embedded as alpha channel."}, "extra_source_images": {"type": "array", "items": {"$ref": "#/definitions/ExtraSourceImage"}}, "r2_upload": {"type": "string", "description": "The r2 upload link to use to upload this image."}, "r2_uploads": {"type": "array", "items": {"type": "string", "description": "The r2 upload link to use to upload this image."}}}, "type": "object"}, "ModelPayloadStable": {"allOf": [{"$ref": "#/definitions/ModelPayloadRootStable"}, {"properties": {"prompt": {"type": "string", "description": "The prompt which will be sent to Stable Diffusion to generate an image."}, "ddim_steps": {"type": "integer", "default": 30}, "n_iter": {"type": "integer", "description": "(Legacy) The amount of images to generate. Use batch_size instead for native ComfyUI batching.", "default": 1}, "batch_size": {"type": "integer", "description": "The number of images to generate in a single batch. Workers should use this for native ComfyUI batching.", "default": 1}, "seeds": {"type": "array", "description": "Array of seeds, one for each image in the batch. Length matches batch_size.", "items": {"type": "integer", "description": "Seed for image generation"}}, "use_nsfw_censor": {"type": "boolean", "description": "When true will apply NSFW censoring model on the generation."}}, "type": "object"}]}, "ResponseModelMessagePop": {"required": ["expiry", "id", "message"], "properties": {"id": {"type": "string", "description": "The ID of this message", "example": "00000000-0000-0000-0000-000000000000"}, "message": {"type": "string", "description": "The message sent", "example": "Hello Worker!"}, "origin": {"type": "string", "description": "The origin of this message. Typically this will be the horde moderators.", "example": "moderator"}, "expiry": {"type": "string", "format": "date-time", "description": "The date at which this message will expire."}}, "type": "object"}, "NoValidRequestFoundStable": {"allOf": [{"$ref": "#/definitions/NoValidRequestFound"}, {"properties": {"max_pixels": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a higher size than this worker provides."}, "step_count": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a higher step count that the worker wants."}, "unsafe_ip": {"type": "integer", "description": "How many waiting requests were skipped because they came from an unsafe IP."}, "img2img": {"type": "integer", "description": "How many waiting requests were skipped because they requested img2img."}, "painting": {"type": "integer", "description": "How many waiting requests were skipped because they requested inpainting/outpainting."}, "post-processing": {"type": "integer", "description": "How many waiting requests were skipped because they requested post-processing."}, "lora": {"type": "integer", "description": "How many waiting requests were skipped because they requested loras."}, "controlnet": {"type": "integer", "description": "How many waiting requests were skipped because they requested a controlnet."}}, "type": "object"}]}, "NoValidRequestFound": {"properties": {"worker_id": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a specific worker.", "minimum": 0}, "performance": {"type": "integer", "description": "How many waiting requests were skipped because they required higher performance.", "minimum": 0}, "nsfw": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a nsfw generation which this worker does not provide.", "minimum": 0}, "blacklist": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a generation with a word that this worker does not accept.", "minimum": 0}, "untrusted": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a trusted worker which this worker is not.", "minimum": 0}, "models": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a different model than what this worker provides.", "example": 0, "minimum": 0}, "bridge_version": {"type": "integer", "description": "How many waiting requests were skipped because they require a higher version of the bridge than this worker is running (upgrade if you see this in your skipped list).", "example": 0, "minimum": 0}, "kudos": {"type": "integer", "description": "How many waiting requests were skipped because the user didn't have enough kudos when this worker requires upfront kudos."}}, "type": "object"}, "SubmitInputStable": {"allOf": [{"$ref": "#/definitions/SubmitInput"}, {"required": ["seed"], "properties": {"seed": {"type": "integer", "description": "The seed for this generation."}, "censored": {"type": "boolean", "description": "OBSOLETE (start using meta): If True, this resulting image has been censored.", "default": false}, "gen_metadata": {"type": "array", "items": {"$ref": "#/definitions/GenerationMetadataStable"}}}, "type": "object"}]}, "SubmitInput": {"required": ["id"], "properties": {"id": {"type": "string", "description": "The UUID of this generation.", "example": "00000000-0000-0000-0000-000000000000"}, "generation": {"type": "string", "description": "R2 result was uploaded to R2, else the string of the result.", "example": "R2"}, "state": {"type": "string", "title": "Generation State", "description": "The state of this generation.", "default": "ok", "example": "ok", "enum": ["ok", "censored", "faulted", "csam"]}}, "type": "object"}, "ModelStyleInputStable": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The name for the style. Case-sensitive and unique per user.", "example": "My Awesome Image Style", "minLength": 1, "maxLength": 100}, "info": {"type": "string", "description": "Some information about this style.", "example": "photorealism excellence.", "minLength": 10, "maxLength": 1000}, "prompt": {"type": "string", "description": "The prompt template which will be sent to Stable Diffusion to generate an image. The user's prompt will be injected into this. This argument MUST include a '{p}' which specifies the part where the user's prompt will be injected and an '{np}' where the user's negative prompt will be injected (if any)", "default": "{p}{np}", "minLength": 7}, "params": {"$ref": "#/definitions/ModelStyleInputParamsStable"}, "public": {"type": "boolean", "description": "When true this style will be listed among all styles publicly.When false, information about this style can only be seen by people who know its ID or name.", "default": true}, "nsfw": {"type": "boolean", "description": "When true, it signified this style is expected to generare NSFW images primarily.", "default": false}, "tags": {"type": "array", "items": {"type": "string", "description": "Tags describing this style. Used for filtering and discovery.", "example": "photorealistic", "minLength": 1, "maxLength": 25}}, "models": {"type": "array", "items": {"type": "string", "description": "The models to use with this style.", "example": "stable_diffusion", "minLength": 1}}, "sharedkey": {"type": "string", "description": "The UUID of a shared key which will be used to fulfil this style when active.", "example": "00000000-0000-0000-0000-000000000000", "minLength": 36, "maxLength": 36}}, "type": "object"}, "ModelStyleInputParamsStable": {"allOf": [{"$ref": "#/definitions/ModelStyleInputParamsStableNoDefaults"}, {"properties": {"steps": {"type": "integer", "minimum": 1, "maximum": 500}}, "type": "object"}]}, "ModelStyleInputParamsStableNoDefaults": {"properties": {"sampler_name": {"type": "string", "example": "k_euler_a", "enum": ["k_euler_a", "k_dpm_2", "k_dpm_adaptive", "k_dpmpp_2s_a", "k_dpm_fast", "k_euler", "lcm", "dpmsolver", "k_lms", "DDIM", "k_dpmpp_2m", "k_heun", "k_dpmpp_sde", "k_dpm_2_a"]}, "cfg_scale": {"type": "number", "minimum": 0, "maximum": 100}, "denoising_strength": {"type": "number", "example": 0.75, "minimum": 0.01, "maximum": 1.0}, "hires_fix_denoising_strength": {"type": "number", "example": 0.75, "minimum": 0.01, "maximum": 1.0}, "height": {"type": "integer", "description": "The height of the image to generate.", "minimum": 64, "maximum": 3072, "multipleOf": 64}, "width": {"type": "integer", "description": "The width of the image to generate.", "minimum": 64, "maximum": 3072, "multipleOf": 64}, "post_processing": {"type": "array", "uniqueItems": true, "items": {"type": "string", "description": "The list of post-processors to apply to the image, in the order to be applied.", "example": "GFPGAN", "enum": ["GFPGAN", "RealESRGAN_x4plus", "RealESRGAN_x2plus", "RealESRGAN_x4plus_anime_6B", "NMKD_Siax", "4x_AnimeSharp", "CodeFormers", "strip_background"]}}, "karras": {"type": "boolean", "description": "Set to True to enable karras noise scheduling tweaks."}, "tiling": {"type": "boolean", "description": "Set to True to create images that stitch together seamlessly."}, "hires_fix": {"type": "boolean", "description": "Set to True to process the image at base resolution before upscaling and re-processing or to use Stable Cascade 2-pass."}, "clip_skip": {"type": "integer", "description": "The number of CLIP language processor layers to skip.", "example": 1, "minimum": 1, "maximum": 12}, "facefixer_strength": {"type": "number", "example": 0.75, "minimum": 0, "maximum": 1.0}, "loras": {"type": "array", "items": {"$ref": "#/definitions/ModelPayloadLorasStable"}}, "tis": {"type": "array", "items": {"$ref": "#/definitions/ModelPayloadTextualInversionsStable"}}, "special": {"$ref": "#/definitions/ModelSpecialPayloadStable"}, "workflow": {"type": "string", "description": "Explicitly specify the horde-engine workflow to use.", "example": "qr_code", "enum": ["qr_code"]}, "transparent": {"type": "boolean", "description": "Set to True to generate the image using Layer Diffuse, creating an image with a transparent background."}}, "type": "object"}, "StyleStable": {"allOf": [{"$ref": "#/definitions/ModelStyleInputStable"}, {"properties": {"id": {"type": "string", "description": "The UUID of the style. Use this to use the style or retrieve its information in the future.", "example": "00000000-0000-0000-0000-000000000000", "minLength": 36, "maxLength": 36}, "use_count": {"type": "integer", "description": "The amount of times this style has been used in generations."}, "creator": {"type": "string", "description": "The alias of the user to whom this style belongs to.", "example": "db0#1"}, "examples": {"type": "array", "items": {"$ref": "#/definitions/StyleExample"}}, "shared_key": {"$ref": "#/definitions/SharedKeyDetails"}}, "type": "object"}]}, "StyleExample": {"allOf": [{"$ref": "#/definitions/InputStyleExamplePost"}, {"properties": {"id": {"type": "string", "description": "The UUID of this example.", "example": "00000000-0000-0000-0000-000000000000"}}, "type": "object"}]}, "InputStyleExamplePost": {"properties": {"url": {"type": "string", "description": "Any extra information from the horde about this request.", "example": "https://lemmy.dbzer0.com/pictrs/image/c9915186-ca30-4f5a-873c-a91287fb4419.webp"}, "primary": {"type": "boolean", "description": "When true this image is to be used as the primary example for this style."}}, "type": "object"}, "SharedKeyDetails": {"properties": {"id": {"type": "string", "description": "The SharedKey ID."}, "username": {"type": "string", "description": "The owning user's unique Username. It is a combination of their chosen alias plus their ID."}, "name": {"type": "string", "description": "The Shared Key Name."}, "kudos": {"type": "integer", "description": "The Kudos limit assigned to this key."}, "expiry": {"type": "string", "format": "date-time", "description": "The date at which this API key will expire."}, "utilized": {"type": "integer", "description": "How much kudos has been utilized via this shared key until now."}, "max_image_pixels": {"type": "integer", "description": "The maximum amount of image pixels this key can generate per job. -1 means unlimited."}, "max_image_steps": {"type": "integer", "description": "The maximum amount of image steps this key can use per job. -1 means unlimited."}, "max_text_tokens": {"type": "integer", "description": "The maximum amount of text tokens this key can generate per job. -1 means unlimited."}}, "type": "object"}, "StyleModify": {"properties": {"id": {"type": "string", "description": "The UUID of the style. Use this to use this style of retrieve its information in the future.", "example": "00000000-0000-0000-0000-000000000000"}, "message": {"type": "string", "description": "Any extra information from the horde about this request."}, "warnings": {"type": "array", "items": {"$ref": "#/definitions/RequestSingleWarning"}}}, "type": "object"}, "ModelStylePatchStable": {"properties": {"name": {"type": "string", "description": "The name for the style. Case-sensitive and unique per user.", "example": "My Awesome Image Style", "minLength": 1, "maxLength": 100}, "info": {"type": "string", "description": "Extra information about this style.", "example": "photorealism excellence.", "minLength": 1, "maxLength": 1000}, "prompt": {"type": "string", "description": "The prompt template which will be sent to Stable Diffusion to generate an image. The user's prompt will be injected into this. This argument MUST include a '{p}' which specifies the part where the user's prompt will be injected and an '{np}' where the user's negative prompt will be injected (if any)", "minLength": 7}, "params": {"$ref": "#/definitions/ModelStyleInputParamsStable"}, "public": {"type": "boolean", "description": "When true this style will be listed among all styles publicly.When false, information about this style can only be seen by people who know its ID or name.", "default": true}, "nsfw": {"type": "boolean", "description": "When true, it signified this style is expected to generare NSFW images primarily.", "default": false}, "tags": {"type": "array", "items": {"type": "string", "description": "Tags describing this style. Used for filtering and discovery.", "example": "photorealistic", "minLength": 1, "maxLength": 25}}, "models": {"type": "array", "items": {"type": "string", "description": "The models to use with this style.", "example": "stable_diffusion", "minLength": 1}}, "sharedkey": {"type": "string", "description": "The UUID of a shared key which will be used to fulfil this style when active.", "example": "00000000-0000-0000-0000-000000000000", "minLength": 36, "maxLength": 36}}, "type": "object"}, "SimpleResponse": {"required": ["message"], "properties": {"message": {"type": "string", "description": "The result of this operation.", "default": "OK"}}, "type": "object"}, "GenerationInputKobold": {"properties": {"prompt": {"type": "string", "description": "The prompt which will be sent to KoboldAI to generate text."}, "params": {"$ref": "#/definitions/ModelGenerationInputKobold"}, "softprompt": {"type": "string", "description": "Specify which softpompt needs to be used to service this request.", "minLength": 1}, "trusted_workers": {"type": "boolean", "description": "When true, only trusted workers will serve this request. When False, Evaluating workers will also be used which can increase speed but adds more risk!", "default": false}, "validated_backends": {"type": "boolean", "description": "When true, only inference backends that are validated by the AI Power Grid devs will serve this request. When False, non-validated backends will also be used which can increase speed but you may end up with unexpected results.", "default": true}, "slow_workers": {"type": "boolean", "description": "When True, allows slower workers to pick up this request. Disabling this incurs an extra kudos cost.", "default": true}, "workers": {"type": "array", "items": {"type": "string", "description": "Specify up to 5 workers which are allowed to service this request."}}, "worker_blacklist": {"type": "boolean", "description": "If true, the worker list will be treated as a blacklist instead of a whitelist.", "default": false}, "models": {"type": "array", "items": {"type": "string", "description": "Specify which models are allowed to be used for this request."}}, "dry_run": {"type": "boolean", "description": "When true, the endpoint will simply return the cost of the request in kudos and exit.", "default": false}, "proxied_account": {"type": "string", "description": "If using a service account as a proxy, provide this value to identify the actual account from which this request is coming from."}, "extra_source_images": {"type": "array", "items": {"$ref": "#/definitions/ExtraSourceImage"}}, "disable_batching": {"type": "boolean", "description": "When true, This request will not use batching. This will allow you to retrieve accurate seeds. Feature is restricted to Trusted users and Patreons.", "default": false}, "allow_downgrade": {"type": "boolean", "description": "When true and the request requires upfront kudos and the account does not have enough The request will be downgraded in max context and max tokens so that it does not need upfront kudos.", "default": false}, "webhook": {"type": "string", "description": "Provide a URL where the AI Power Grid will send a POST call after each delivered generation. The request will include the details of the job as well as the request ID."}, "style": {"type": "string", "description": "A horde style ID or name to use for this generation", "example": "00000000-0000-0000-0000-000000000000", "minLength": 3, "maxLength": 2048}, "extra_slow_workers": {"type": "boolean", "description": "When True, allows very slower workers to pick up this request. Use this when you don't mind waiting a lot.", "default": false}, "wallet_id": {"type": "string", "description": "EVM wallet address to associate with this generation for gallery tracking.", "example": "0xe2dddDDf4dD22e98265BBf0E6bDC1cB3A4Bb26a8", "maxLength": 42}}, "type": "object"}, "ModelGenerationInputKobold": {"allOf": [{"$ref": "#/definitions/ModelPayloadRootKobold"}, {"properties": {}, "type": "object"}]}, "ModelPayloadRootKobold": {"allOf": [{"$ref": "#/definitions/ModelPayloadStyleKobold"}, {"properties": {"n": {"type": "integer", "example": 1, "minimum": 1, "maximum": 20}, "max_context_length": {"type": "integer", "description": "Maximum number of tokens to send to the model.", "default": 2048, "minimum": 80, "maximum": 1048576}, "max_length": {"type": "integer", "description": "Number of tokens to generate.", "default": 80, "minimum": 16, "maximum": 2048}}, "type": "object"}]}, "ModelPayloadStyleKobold": {"properties": {"frmtadsnsp": {"type": "boolean", "description": "Input formatting option. When enabled, adds a leading space to your input if there is no trailing whitespace at the end of the previous action.", "example": false}, "frmtrmblln": {"type": "boolean", "description": "Output formatting option. When enabled, replaces all occurrences of two or more consecutive newlines in the output with one newline.", "example": false}, "frmtrmspch": {"type": "boolean", "description": "Output formatting option. When enabled, removes #/@%}{+=~|\\^<> from the output.", "example": false}, "frmttriminc": {"type": "boolean", "description": "Output formatting option. When enabled, removes some characters from the end of the output such that the output doesn't end in the middle of a sentence. If the output is less than one sentence long, does nothing.", "example": false}, "rep_pen": {"type": "number", "description": "Base repetition penalty value.", "minimum": 1, "maximum": 3}, "rep_pen_range": {"type": "integer", "description": "Repetition penalty range.", "minimum": 0, "maximum": 4096}, "rep_pen_slope": {"type": "number", "description": "Repetition penalty slope.", "minimum": 0, "maximum": 10}, "singleline": {"type": "boolean", "description": "Output formatting option. When enabled, removes everything after the first line of the output, including the newline.", "example": false}, "temperature": {"type": "number", "description": "Temperature value.", "minimum": 0, "maximum": 5.0}, "tfs": {"type": "number", "description": "Tail free sampling value.", "minimum": 0.0, "maximum": 1.0}, "top_a": {"type": "number", "description": "Top-a sampling value.", "minimum": 0.0, "maximum": 1.0}, "top_k": {"type": "integer", "description": "Top-k sampling value.", "minimum": 0, "maximum": 100}, "top_p": {"type": "number", "description": "Top-p sampling value.", "minimum": 0.001, "maximum": 1.0}, "typical": {"type": "number", "description": "Typical sampling value.", "minimum": 0.0, "maximum": 1.0}, "sampler_order": {"type": "array", "items": {"type": "integer", "description": "Array of integers representing the sampler order to be used."}}, "use_default_badwordsids": {"type": "boolean", "description": "When True, uses the default KoboldAI bad word IDs.", "example": true}, "stop_sequence": {"type": "array", "items": {"type": "string", "description": "An array of string sequences whereby the model will stop generating further tokens. The returned text WILL contain the stop sequence."}}, "min_p": {"type": "number", "description": "Min-p sampling value.", "default": 0.0, "minimum": 0.0, "maximum": 1.0}, "smoothing_factor": {"type": "number", "description": "Quadratic sampling value.", "default": 0.0, "minimum": 0.0, "maximum": 10.0}, "dynatemp_range": {"type": "number", "description": "Dynamic temperature range value.", "default": 0.0, "minimum": 0.0, "maximum": 5.0}, "dynatemp_exponent": {"type": "number", "description": "Dynamic temperature exponent value.", "default": 1.0, "minimum": 0.0, "maximum": 5.0}}, "type": "object"}, "RequestStatusKobold": {"allOf": [{"$ref": "#/definitions/RequestStatusCheck"}, {"properties": {"generations": {"type": "array", "items": {"$ref": "#/definitions/GenerationKobold"}}}, "type": "object"}]}, "GenerationKobold": {"allOf": [{"$ref": "#/definitions/Generation"}, {"properties": {"text": {"type": "string", "title": "Generated Text", "description": "The generated text.", "minLength": 0}, "seed": {"type": "integer", "title": "Generation Seed", "description": "The seed which generated this text.", "default": 0}, "gen_metadata": {"type": "array", "items": {"$ref": "#/definitions/GenerationMetadataKobold"}}}, "type": "object"}]}, "GenerationMetadataKobold": {"required": ["type", "value"], "properties": {"type": {"type": "string", "description": "The relevance of the metadata field", "example": "censorship", "enum": ["censorship"]}, "value": {"type": "string", "description": "The value of the metadata field", "example": "csam", "enum": ["csam"]}, "ref": {"type": "string", "description": "Optionally a reference for the metadata (e.g. a lora ID)", "maxLength": 255}}, "type": "object"}, "PopInputKobold": {"allOf": [{"$ref": "#/definitions/PopInput"}, {"properties": {"max_length": {"type": "integer", "description": "The maximum amount of tokens this worker can generate.", "default": 512}, "max_context_length": {"type": "integer", "description": "The max amount of context to submit to this AI for sampling.", "default": 2048}, "softprompts": {"type": "array", "items": {"type": "string", "description": "The available softprompt files on this worker for the currently running model."}}}, "type": "object"}]}, "GenerationPayloadKobold": {"properties": {"payload": {"$ref": "#/definitions/ModelPayloadKobold"}, "id": {"type": "string", "description": "The UUID for this text generation."}, "ids": {"type": "array", "items": {"type": "string", "description": "The UUID for this text generation.", "example": "00000000-0000-0000-0000-000000000000"}}, "messages": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelMessagePop"}}, "ttl": {"type": "integer", "description": "The amount of seconds before this job is considered stale and aborted."}, "extra_source_images": {"type": "array", "items": {"$ref": "#/definitions/ExtraSourceImage"}}, "skipped": {"$ref": "#/definitions/NoValidRequestFoundKobold"}, "softprompt": {"type": "string", "description": "The soft prompt requested for this generation."}, "model": {"type": "string", "description": "Which of the available models to use for this request."}}, "type": "object"}, "ModelPayloadKobold": {"allOf": [{"$ref": "#/definitions/ModelPayloadRootKobold"}, {"properties": {"prompt": {"type": "string", "description": "The prompt which will be sent to KoboldAI to generate the text."}}, "type": "object"}]}, "NoValidRequestFoundKobold": {"allOf": [{"$ref": "#/definitions/NoValidRequestFound"}, {"properties": {"max_context_length": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a higher max_context_length than what this worker provides.", "example": 0}, "max_length": {"type": "integer", "description": "How many waiting requests were skipped because they demanded more generated tokens that what this worker can provide.", "example": 0}, "matching_softprompt": {"type": "integer", "description": "How many waiting requests were skipped because they demanded an available soft-prompt which this worker does not have.", "example": 0}}, "type": "object"}]}, "SubmitInputKobold": {"allOf": [{"$ref": "#/definitions/SubmitInput"}, {"properties": {"gen_metadata": {"type": "array", "items": {"$ref": "#/definitions/GenerationMetadataKobold"}}}, "type": "object"}]}, "ModelStyleInputKobold": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The name for the style. Case-sensitive and unique per user.", "example": "My Awesome Text Style", "minLength": 1, "maxLength": 100}, "info": {"type": "string", "description": "Some information about this style.", "example": "Dark, brooding vibes", "minLength": 10, "maxLength": 1000}, "prompt": {"type": "string", "description": "The prompt template which will be sent to Stable Diffusion to generate an image. The user's prompt will be injected into this. This argument MUST include a '{p}' which specifies the part where the user's prompt will be injected.", "default": "{p}", "minLength": 3}, "params": {"$ref": "#/definitions/ModelStyleInputParamsKobold"}, "public": {"type": "boolean", "description": "When true this style will be listed among all styles publicly.When false, information about this style can only be seen by people who know its ID or name.", "default": true}, "nsfw": {"type": "boolean", "description": "When true, it signified this style is expected to generare NSFW images primarily.", "default": false}, "tags": {"type": "array", "items": {"type": "string", "description": "Tags describing this style. Used for filtering and discovery.", "example": "dark", "minLength": 1, "maxLength": 25}}, "models": {"type": "array", "items": {"type": "string", "description": "The models to use with this style.", "example": "llama3", "minLength": 1}}}, "type": "object"}, "ModelStyleInputParamsKobold": {"allOf": [{"$ref": "#/definitions/ModelPayloadStyleKobold"}, {"properties": {}, "type": "object"}]}, "StyleKobold": {"allOf": [{"$ref": "#/definitions/ModelStyleInputKobold"}, {"properties": {"id": {"type": "string", "description": "The UUID of the style. Use this to use the style or retrieve its information in the future.", "example": "00000000-0000-0000-0000-000000000000"}, "use_count": {"type": "integer", "description": "The amount of times this style has been used in generations."}, "creator": {"type": "string", "description": "The alias of the user to whom this style belongs to.", "example": "db0#1"}}, "type": "object"}]}, "ModelStylePatchKobold": {"properties": {"name": {"type": "string", "description": "The name for the style. Case-sensitive and unique per user.", "example": "My Awesome Text Style", "minLength": 1, "maxLength": 100}, "info": {"type": "string", "description": "Extra information about this style.", "example": "Dark, brooding vibes", "minLength": 1, "maxLength": 1000}, "prompt": {"type": "string", "description": "The prompt template which will be sent to Stable Diffusion to generate an image. The user's prompt will be injected into this. This argument MUST include a '{p}' which specifies the part where the user's prompt will be injected.", "minLength": 7}, "params": {"$ref": "#/definitions/ModelStyleInputParamsKobold"}, "public": {"type": "boolean", "description": "When true this style will be listed among all styles publicly.When false, information about this style can only be seen by people who know its ID or name.", "default": true}, "nsfw": {"type": "boolean", "description": "When true, it signified this style is expected to generare NSFW images primarily.", "default": false}, "tags": {"type": "array", "items": {"type": "string", "description": "Tags describing this style. Used for filtering and discovery.", "example": "dark", "minLength": 1, "maxLength": 25}}, "models": {"type": "array", "items": {"type": "string", "description": "The models to use with this style.", "example": "llama3", "minLength": 1}}}, "type": "object"}, "InputModelCollection": {"properties": {"name": {"type": "string", "description": "The name for the collection. Case-sensitive and unique per user.", "example": "My Awesome Collection", "minLength": 1, "maxLength": 100}, "info": {"type": "string", "description": "Extra information about this collection.", "example": "Collection of optimistic styles", "minLength": 1, "maxLength": 1000}, "public": {"type": "boolean", "description": "When true this collection will be listed among all collections publicly.When false, information about this collection can only be seen by people who know its ID or name.", "default": true}, "styles": {"type": "array", "items": {"type": "string", "description": "The styles to use in this collection.", "minLength": 1}}}, "type": "object"}, "ResponseModelCollection": {"properties": {"id": {"type": "string", "description": "The UUID of the collection. Use this to use this collection of retrieve its information in the future."}, "name": {"type": "string", "description": "The name for the collection. Case-sensitive and unique per user.", "minLength": 1, "maxLength": 100}, "type": {"type": "string", "description": "The kind of styles stored in this collection.", "example": "image", "enum": ["image", "text"]}, "info": {"type": "string", "description": "Extra information about this collection.", "minLength": 1, "maxLength": 1000}, "public": {"type": "boolean", "description": "When true this collection will be listed among all collection publicly.When false, information about this collection can only be seen by people who know its ID or name.", "default": true}, "styles": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelStylesShort"}}, "use_count": {"type": "integer", "description": "The amount of times this collection has been used in generations."}}, "type": "object"}, "ResponseModelStylesShort": {"properties": {"name": {"type": "string", "description": "The unique name for this style", "example": "db0#1::style::my awesome style"}, "id": {"type": "string", "description": "The ID of this style", "example": "00000000-0000-0000-0000-000000000000"}}, "type": "object"}, "UserDetails": {"properties": {"username": {"type": "string", "description": "The user's unique Username. It is a combination of their chosen alias plus their ID."}, "id": {"type": "integer", "description": "The user unique ID. It is always an integer."}, "kudos": {"type": "number", "description": "The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image generations."}, "evaluating_kudos": {"type": "number", "description": "(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When this number reaches a prespecified threshold, they automatically become trusted."}, "concurrency": {"type": "integer", "description": "How many concurrent generations this user may request."}, "worker_invited": {"type": "integer", "description": "Whether this user has been invited to join a worker to the AI Power Grid and how many of them. When 0, this user cannot add (new) workers to the horde."}, "moderator": {"type": "boolean", "description": "This user is a AI Power Grid moderator.", "example": false}, "kudos_details": {"$ref": "#/definitions/UserKudosDetails"}, "worker_count": {"type": "integer", "description": "How many workers this user has created (active or inactive)."}, "worker_ids": {"type": "array", "items": {"type": "string", "description": "Privileged or public when the user has explicitly allows it to be public.", "example": "00000000-0000-0000-0000-000000000000", "minLength": 36, "maxLength": 36}}, "styles": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelStylesUser"}}, "sharedkey_ids": {"type": "array", "items": {"type": "string", "description": "(Privileged) The list of shared key IDs created by this user.", "example": "00000000-0000-0000-0000-000000000000"}}, "active_generations": {"$ref": "#/definitions/UserActiveGenerations"}, "monthly_kudos": {"$ref": "#/definitions/MonthlyKudos"}, "trusted": {"type": "boolean", "description": "This user is a trusted member of the AI Power Grid.", "example": false}, "flagged": {"type": "boolean", "description": "(Privileged) This user has been flagged for suspicious activity.", "example": false}, "vpn": {"type": "boolean", "description": "(Privileged) This user has been given the VPN role.", "example": false}, "service": {"type": "boolean", "description": "This is a service account used by a horde proxy.", "example": false}, "education": {"type": "boolean", "description": "This is an education account used schools and universities.", "example": false}, "customizer": {"type": "boolean", "description": "When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Power Grid Model Reference.", "example": false}, "special": {"type": "boolean", "description": "(Privileged) This user has been given the Special role.", "example": false}, "suspicious": {"type": "integer", "description": "(Privileged) How much suspicion this user has accumulated.", "example": 0}, "pseudonymous": {"type": "boolean", "description": "If true, this user has not registered using an oauth service.", "example": false}, "contact": {"type": "string", "description": "(Privileged) Contact details for the horde admins to reach the user in case of emergency.", "example": "email@example.com"}, "admin_comment": {"type": "string", "description": "(Privileged) Information about this users by the admins", "example": "User is sus"}, "account_age": {"type": "integer", "description": "How many seconds since this account was created.", "example": 60}, "usage": {"$ref": "#/definitions/UsageDetails"}, "contributions": {"$ref": "#/definitions/ContributionsDetails"}, "records": {"$ref": "#/definitions/UserRecords"}}, "type": "object"}, "UserKudosDetails": {"properties": {"accumulated": {"type": "number", "description": "The ammount of Kudos accumulated or used for generating images.", "default": 0}, "gifted": {"type": "number", "description": "The amount of Kudos this user has given to other users.", "default": 0}, "donated": {"type": "number", "description": "The amount of Kudos this user has donated to public goods accounts like education.", "default": 0}, "admin": {"type": "number", "description": "The amount of Kudos this user has been given by the AI Power Grid admins.", "default": 0}, "received": {"type": "number", "description": "The amount of Kudos this user has been given by other users.", "default": 0}, "recurring": {"type": "number", "description": "The amount of Kudos this user has received from recurring rewards.", "default": 0}, "awarded": {"type": "number", "description": "The amount of Kudos this user has been awarded from things like rating images.", "default": 0}, "styled": {"type": "number", "description": "The amount of Kudos this user has been awarded for styling other people's requests.", "default": 0}}, "type": "object"}, "ResponseModelStylesUser": {"allOf": [{"$ref": "#/definitions/ResponseModelStylesShort"}, {"properties": {"type": {"type": "string", "description": "The style type, image or text", "example": "image", "enum": ["image", "text"]}}, "type": "object"}]}, "UserActiveGenerations": {"properties": {"text": {"type": "array", "items": {"type": "string", "description": "(Privileged) The list of active text generation IDs requested by this user.", "example": "00000000-0000-0000-0000-000000000000"}}, "image": {"type": "array", "items": {"type": "string", "description": "(Privileged) The list of active image generation IDs requested by this user.", "example": "00000000-0000-0000-0000-000000000000"}}, "alchemy": {"type": "array", "items": {"type": "string", "description": "(Privileged) The list of active alchemy generation IDs requested by this user.", "example": "00000000-0000-0000-0000-000000000000"}}}, "type": "object"}, "MonthlyKudos": {"properties": {"amount": {"type": "integer", "description": "How much recurring Kudos this user receives monthly."}, "last_received": {"type": "string", "format": "date-time", "description": "Last date this user received monthly Kudos."}}, "type": "object"}, "UsageDetails": {"properties": {"megapixelsteps": {"type": "number", "description": "How many megapixelsteps this user has requested."}, "requests": {"type": "integer", "description": "How many images this user has requested."}}, "type": "object"}, "ContributionsDetails": {"properties": {"megapixelsteps": {"type": "number", "description": "How many megapixelsteps this user has generated."}, "fulfillments": {"type": "integer", "description": "How many images this user has generated."}}, "type": "object"}, "UserRecords": {"properties": {"usage": {"$ref": "#/definitions/UserThingRecords"}, "contribution": {"$ref": "#/definitions/UserThingRecords"}, "fulfillment": {"$ref": "#/definitions/UserAmountRecords"}, "request": {"$ref": "#/definitions/UserAmountRecords"}, "style": {"$ref": "#/definitions/UserAmountRecords"}}, "type": "object"}, "UserThingRecords": {"properties": {"megapixelsteps": {"type": "number", "description": "How many megapixelsteps this user has generated or requested.", "default": 0}, "tokens": {"type": "integer", "description": "How many token this user has generated or requested.", "default": 0}}, "type": "object"}, "UserAmountRecords": {"properties": {"image": {"type": "integer", "description": "How many images this user has generated, requested or styled.", "default": 0}, "text": {"type": "integer", "description": "How many texts this user has generated, requested or styled.", "default": 0}, "interrogation": {"type": "integer", "description": "How many texts this user has generated or requested.", "default": 0}}, "type": "object"}, "ModifyUserInput": {"properties": {"kudos": {"type": "number", "description": "The amount of kudos to modify (can be negative)."}, "concurrency": {"type": "integer", "description": "The amount of concurrent request this user can have.", "minimum": 0, "maximum": 500}, "usage_multiplier": {"type": "number", "description": "The amount by which to multiply the users kudos consumption.", "minimum": 0.1, "maximum": 10}, "worker_invited": {"type": "integer", "description": "Set to the amount of workers this user is allowed to join to the horde when in worker invite-only mode."}, "moderator": {"type": "boolean", "description": "Set to true to make this user a horde moderator.", "example": false}, "public_workers": {"type": "boolean", "description": "Set to true to make this user display their worker IDs.", "example": false}, "monthly_kudos": {"type": "integer", "description": "When specified, will start assigning the user monthly kudos, starting now!"}, "username": {"type": "string", "description": "When specified, will change the username. No profanity allowed!", "minLength": 3, "maxLength": 100}, "trusted": {"type": "boolean", "description": "When set to true,the user and their servers will not be affected by suspicion.", "example": false}, "flagged": {"type": "boolean", "description": "When set to true, the user cannot tranfer kudos and all their workers are put into permanent maintenance.", "example": false}, "customizer": {"type": "boolean", "description": "When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Power Grid Model Reference.", "example": false}, "vpn": {"type": "boolean", "description": "When set to true, the user will be able to onboard workers behind a VPN. This should be used as a temporary solution until the user is trusted.", "example": false}, "service": {"type": "boolean", "description": "When set to true, the user is considered a service account proxying the requests for other users.", "example": false}, "education": {"type": "boolean", "description": "When set to true, the user is considered an education account and some options become more restrictive.", "example": false}, "special": {"type": "boolean", "description": "When set to true, The user can send special payloads.", "example": false}, "filtered": {"type": "boolean", "description": "When set to true, the replacement filter will always be applied against this user", "example": false}, "reset_suspicion": {"type": "boolean", "description": "Set the user's suspicion back to 0."}, "contact": {"type": "string", "description": "Contact details for the horde admins to reach the user in case of emergency. This is only visible to horde moderators.", "example": "email@example.com", "minLength": 5, "maxLength": 500}, "admin_comment": {"type": "string", "description": "Add further information about this user for the other admins.", "example": "User is sus", "minLength": 5, "maxLength": 500}}, "type": "object"}, "ModifyUser": {"properties": {"new_kudos": {"type": "number", "description": "The new total Kudos this user has after this request."}, "concurrency": {"type": "integer", "description": "The request concurrency this user has after this request.", "example": 30}, "usage_multiplier": {"type": "number", "description": "Multiplies the amount of kudos lost when generating images.", "example": 1.0}, "worker_invited": {"type": "integer", "description": "Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user cannot add (new) workers to the horde.", "example": 1}, "moderator": {"type": "boolean", "description": "The user's new moderator status.", "example": false}, "public_workers": {"type": "boolean", "description": "The user's new public_workers status.", "example": false}, "username": {"type": "string", "description": "The user's new username.", "example": "username#1"}, "monthly_kudos": {"type": "integer", "description": "The user's new monthly kudos total.", "example": 0}, "trusted": {"type": "boolean", "description": "The user's new trusted status."}, "flagged": {"type": "boolean", "description": "The user's new flagged status."}, "customizer": {"type": "boolean", "description": "The user's new customizer status."}, "vpn": {"type": "boolean", "description": "The user's new vpn status."}, "service": {"type": "boolean", "description": "The user's new service status."}, "education": {"type": "boolean", "description": "The user's new education status."}, "special": {"type": "boolean", "description": "The user's new special status."}, "new_suspicion": {"type": "integer", "description": "The user's new suspiciousness rating."}, "contact": {"type": "string", "description": "The new contact details.", "example": "email@example.com"}, "admin_comment": {"type": "string", "description": "The new admin comment.", "example": "User is sus", "minLength": 5, "maxLength": 500}}, "type": "object"}, "SharedKeyInput": {"properties": {"kudos": {"type": "integer", "description": "The Kudos limit assigned to this key. If -1, then anyone with this key can use an unlimited amount of kudos from this account.", "default": 5000, "minimum": -1, "maximum": 50000000}, "expiry": {"type": "integer", "description": "The amount of days after which this key will expire. If -1, this key will not expire.", "default": -1, "example": 30, "minimum": -1}, "name": {"type": "string", "description": "A descriptive name for this key.", "example": "Mutual Aid", "minLength": 3, "maxLength": 255}, "max_image_pixels": {"type": "integer", "description": "The maximum amount of image pixels this key can generate per job. -1 means unlimited.", "default": -1, "minimum": -1, "maximum": 4194304}, "max_image_steps": {"type": "integer", "description": "The maximum amount of image steps this key can use per job. -1 means unlimited.", "default": -1, "minimum": -1, "maximum": 500}, "max_text_tokens": {"type": "integer", "description": "The maximum amount of text tokens this key can generate per job. -1 means unlimited.", "default": -1, "minimum": -1, "maximum": 500}}, "type": "object"}, "WorkerDetails": {"allOf": [{"$ref": "#/definitions/WorkerDetailsLite"}, {"required": ["bridge_agent"], "properties": {"requests_fulfilled": {"type": "integer", "description": "How many images this worker has generated."}, "kudos_rewards": {"type": "number", "description": "How many Kudos this worker has been rewarded in total."}, "kudos_details": {"$ref": "#/definitions/WorkerKudosDetails"}, "performance": {"type": "string", "description": "The average performance of this worker in human readable form."}, "threads": {"type": "integer", "description": "How many threads this worker is running."}, "uptime": {"type": "integer", "description": "The amount of seconds this worker has been online for this AI Power Grid."}, "maintenance_mode": {"type": "boolean", "description": "When True, this worker will not pick up any new requests.", "example": false}, "paused": {"type": "boolean", "description": "(Privileged) When True, this worker not be given any new requests.", "example": false}, "info": {"type": "string", "description": "Extra information or comments about this worker provided by its owner.", "example": "https://dbzer0.com"}, "nsfw": {"type": "boolean", "description": "Whether this worker can generate NSFW requests or not.", "default": false}, "owner": {"type": "string", "description": "Privileged or public if the owner has allowed it. The alias of the owner of this worker.", "example": "username#1"}, "ipaddr": {"type": "string", "description": "Privileged. The last known IP this worker has connected from.", "example": "username#1"}, "trusted": {"type": "boolean", "description": "The worker is trusted to return valid generations."}, "flagged": {"type": "boolean", "description": "The worker's owner has been flagged for suspicious activity. This worker will not be given any jobs to process."}, "suspicious": {"type": "integer", "description": "(Privileged) How much suspicion this worker has accumulated.", "example": 0}, "uncompleted_jobs": {"type": "integer", "description": "How many jobs this worker has left uncompleted after it started them.", "example": 0}, "models": {"type": "array", "items": {"type": "string", "description": "Which models this worker if offering."}}, "forms": {"type": "array", "items": {"type": "string", "description": "Which forms this worker if offering."}}, "team": {"$ref": "#/definitions/TeamDetailsLite"}, "contact": {"type": "string", "description": "(Privileged) Contact details for the horde admins to reach the owner of this worker in emergencies.", "example": "email@example.com", "minLength": 5, "maxLength": 500}, "bridge_agent": {"type": "string", "description": "The bridge agent name, version and website.", "default": "unknown:0:unknown", "example": "AI Horde Worker reGen:4.1.0:https://github.com/Haidra-Org/horde-worker-reGen", "maxLength": 1000}, "wallet_address": {"type": "string", "description": "The EVM wallet address for Web3 reward payouts.", "example": "0x1234567890abcdef1234567890abcdef12345678", "maxLength": 42}, "max_pixels": {"type": "integer", "description": "The maximum pixels in resolution this worker can generate.", "example": 262144}, "megapixelsteps_generated": {"type": "number", "description": "How many megapixelsteps this worker has generated until now."}, "img2img": {"type": "boolean", "description": "If True, this worker supports and allows img2img requests."}, "painting": {"type": "boolean", "description": "If True, this worker supports and allows inpainting requests."}, "post-processing": {"type": "boolean", "description": "If True, this worker supports and allows post-processing requests."}, "lora": {"type": "boolean", "description": "If True, this worker supports and allows lora requests."}, "controlnet": {"type": "boolean", "description": "If True, this worker supports and allows controlnet requests."}, "sdxl_controlnet": {"type": "boolean", "description": "If True, this worker supports and allows SDXL controlnet requests."}, "max_length": {"type": "integer", "description": "The maximum tokens this worker can generate.", "example": 80}, "max_context_length": {"type": "integer", "description": "The maximum tokens this worker can read.", "example": 80}, "tokens_generated": {"type": "number", "description": "How many tokens this worker has generated until now."}, "messages": {"type": "array", "items": {"$ref": "#/definitions/ResponseModelMessage"}}}, "type": "object"}]}, "WorkerDetailsLite": {"properties": {"type": {"type": "string", "description": "The Type of worker this is.", "example": "image", "enum": ["image", "text", "interrogation"]}, "name": {"type": "string", "description": "The Name given to this worker."}, "id": {"type": "string", "description": "The UUID of this worker."}, "online": {"type": "boolean", "description": "True if the worker has checked-in the past 5 minutes."}}, "type": "object"}, "WorkerKudosDetails": {"properties": {"generated": {"type": "number", "description": "How much Kudos this worker has received for generating images."}, "uptime": {"type": "integer", "description": "How much Kudos this worker has received for staying online longer."}}, "type": "object"}, "TeamDetailsLite": {"properties": {"name": {"type": "string", "description": "The Name given to this team."}, "id": {"type": "string", "description": "The UUID of this team."}}, "type": "object"}, "ResponseModelMessage": {"required": ["message"], "properties": {"worker_id": {"type": "string", "description": "The ID of the worker this message is intended for.", "example": "00000000-0000-0000-0000-000000000000", "minLength": 36, "maxLength": 36}, "message": {"type": "string", "description": "The message sent", "example": "Hello Worker!", "minLength": 1, "maxLength": 20480}, "origin": {"type": "string", "description": "The origin of this message. Typically this will be the horde moderators.", "example": "AI Horde Moderators", "minLength": 1, "maxLength": 255}, "expiry": {"type": "integer", "description": "The number of hours after which this message expires.", "default": 12, "minimum": 1, "maximum": 720}}, "type": "object"}, "ModifyWorkerInput": {"properties": {"maintenance": {"type": "boolean", "description": "Set to true to put this worker into maintenance."}, "maintenance_msg": {"type": "string", "description": "if maintenance is True, you can optionally provide a message to be used instead of the default maintenance message, so that the owner is informed."}, "paused": {"type": "boolean", "description": "(Mods only) Set to true to pause this worker."}, "info": {"type": "string", "description": "You can optionally provide a server note which will be seen in the server details. No profanity allowed!", "maxLength": 1000}, "name": {"type": "string", "description": "When this is set, it will change the worker's name. No profanity allowed!", "minLength": 5, "maxLength": 100}, "team": {"type": "string", "description": "The team towards which this worker contributes kudos.  It an empty string ('') is passed, it will leave the worker without a team. No profanity allowed!", "example": "0bed257b-e57c-4327-ac64-40cdfb1ac5e6", "maxLength": 36}}, "type": "object"}, "DeletedWorker": {"properties": {"deleted_id": {"type": "string", "description": "The ID of the deleted worker."}, "deleted_name": {"type": "string", "description": "The Name of the deleted worker."}}, "type": "object"}, "ModifyWorker": {"properties": {"maintenance": {"type": "boolean", "description": "The new state of the 'maintenance' var for this worker. When True, this worker will not pick up any new requests."}, "paused": {"type": "boolean", "description": "The new state of the 'paused' var for this worker. When True, this worker will not be given any new requests."}, "info": {"type": "string", "description": "The new state of the 'info' var for this worker."}, "name": {"type": "string", "description": "The new name for this this worker."}, "team": {"type": "string", "description": "The new team of this worker.", "example": "Direct Action"}}, "type": "object"}, "KudosTransferred": {"properties": {"transferred": {"type": "number", "description": "The amount of Kudos tranferred.", "example": 100}}, "type": "object"}, "KudosAwarded": {"properties": {"awarded": {"type": "number", "description": "The amount of Kudos awarded.", "example": 100}}, "type": "object"}, "HordeModes": {"properties": {"maintenance_mode": {"type": "boolean", "description": "When True, this horde will not accept new requests for image generation, but will finish processing the ones currently in the queue."}, "invite_only_mode": {"type": "boolean", "description": "When True, this horde will not only accept worker explicitly invited to join."}, "raid_mode": {"type": "boolean", "description": "When True, this horde will not always provide full information in order to throw off attackers."}}, "type": "object"}, "HordePerformance": {"properties": {"queued_requests": {"type": "integer", "description": "The amount of waiting and processing image requests currently in this horde."}, "queued_text_requests": {"type": "integer", "description": "The amount of waiting and processing text requests currently in this horde."}, "worker_count": {"type": "integer", "description": "How many workers are actively processing prompt generations in this horde in the past 5 minutes."}, "text_worker_count": {"type": "integer", "description": "How many workers are actively processing prompt generations in this horde in the past 5 minutes."}, "thread_count": {"type": "integer", "description": "How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes."}, "text_thread_count": {"type": "integer", "description": "How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes."}, "queued_megapixelsteps": {"type": "number", "description": "The amount of megapixelsteps in waiting and processing requests currently in this horde."}, "past_minute_megapixelsteps": {"type": "number", "description": "How many megapixelsteps this horde generated in the last minute."}, "queued_forms": {"type": "number", "description": "The amount of image interrogations waiting and processing currently in this horde."}, "interrogator_count": {"type": "integer", "description": "How many workers are actively processing image interrogations in this {horde_noun} in the past 5 minutes."}, "interrogator_thread_count": {"type": "integer", "description": "How many worker threads are actively processing image interrogation in this {horde_noun} in the past 5 minutes."}, "queued_tokens": {"type": "number", "description": "The amount of tokens in waiting and processing requests currently in this horde."}, "past_minute_tokens": {"type": "number", "description": "How many tokens this horde generated in the last minute."}}, "type": "object"}, "ActiveModel": {"allOf": [{"$ref": "#/definitions/ActiveModelLite"}, {"properties": {"performance": {"type": "number", "description": "The average speed of generation for this model."}, "queued": {"type": "number", "description": "The amount waiting to be generated by this model."}, "jobs": {"type": "number", "description": "The job count waiting to be generated by this model."}, "eta": {"type": "integer", "description": "Estimated time in seconds for this model's queue to be cleared."}, "type": {"type": "string", "description": "The model type (text or image).", "example": "image", "enum": ["image", "text"]}}, "type": "object"}]}, "ActiveModelLite": {"properties": {"name": {"type": "string", "description": "The Name of a model available by workers in this horde."}, "count": {"type": "integer", "description": "How many of workers in this horde are running this model."}}, "type": "object"}, "Newspiece": {"properties": {"date_published": {"type": "string", "description": "The date this newspiece was published."}, "newspiece": {"type": "string", "description": "The actual piece of news."}, "importance": {"type": "string", "description": "How critical this piece of news is.", "example": "Information"}, "tags": {"type": "array", "items": {"type": "string", "description": "Tags for this newspiece."}}, "title": {"type": "string", "description": "The title of this newspiece."}, "more_info_urls": {"type": "array", "items": {"type": "string", "description": "URLs for more information about this newspiece."}}}, "type": "object"}, "CreateTeamInput": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The name of the team. No profanity allowed!", "minLength": 3, "maxLength": 100}, "info": {"type": "string", "description": "Extra information or comments about this team.", "example": "Anarchy is emergent order.", "minLength": 3, "maxLength": 1000}}, "type": "object"}, "TeamDetails": {"allOf": [{"$ref": "#/definitions/TeamDetailsLite"}, {"properties": {"info": {"type": "string", "description": "Extra information or comments about this team provided by its owner.", "example": "Anarchy is emergent order."}, "requests_fulfilled": {"type": "integer", "description": "How many images this team's workers have generated."}, "kudos": {"type": "number", "description": "How many Kudos the workers in this team have been rewarded while part of this team."}, "uptime": {"type": "integer", "description": "The total amount of time workers have stayed online while on this team."}, "creator": {"type": "string", "description": "The alias of the user which created this team.", "example": "db0#1"}, "worker_count": {"type": "integer", "description": "How many workers have been dedicated to this team.", "example": 10}, "workers": {"type": "array", "items": {"$ref": "#/definitions/WorkerDetailsLite"}}, "models": {"type": "array", "items": {"$ref": "#/definitions/ActiveModelLite"}}}, "type": "object"}]}, "ModifyTeam": {"properties": {"id": {"type": "string", "description": "The ID of the team."}, "name": {"type": "string", "description": "The Name of the team."}, "info": {"type": "string", "description": "The Info of the team."}}, "type": "object"}, "ModifyTeamInput": {"properties": {"name": {"type": "string", "description": "The name of the team. No profanity allowed!", "minLength": 3, "maxLength": 100}, "info": {"type": "string", "description": "Extra information or comments about this team.", "example": "Anarchy is emergent order.", "minLength": 3, "maxLength": 1000}}, "type": "object"}, "DeletedTeam": {"properties": {"deleted_id": {"type": "string", "description": "The ID of the deleted team."}, "deleted_name": {"type": "string", "description": "The Name of the deleted team."}}, "type": "object"}, "DeleteTimeoutIPInput": {"required": ["ipaddr"], "properties": {"ipaddr": {"type": "string", "description": "The IP address or CIDR to remove from timeout.", "example": "127.0.0.1", "minLength": 7, "maxLength": 40}}, "type": "object"}, "AddTimeoutIPInput": {"required": ["hours", "ipaddr"], "properties": {"ipaddr": {"type": "string", "description": "The IP address or CIDR to add from timeout.", "example": "127.0.0.1", "minLength": 7, "maxLength": 40}, "hours": {"type": "integer", "description": "For how many hours to put this IP in timeout.", "example": 24, "minimum": 1, "maximum": 720}}, "type": "object"}, "IPTimeout": {"required": ["ipaddr", "seconds"], "properties": {"ipaddr": {"type": "string", "description": "The CIDR which is in timeout.", "example": "127.0.0.1", "minLength": 7, "maxLength": 40}, "seconds": {"type": "integer", "description": "How many more seconds this IP block is in timeout ", "example": 1440}}, "type": "object"}, "AddWorkerTimeout": {"required": ["days"], "properties": {"days": {"type": "integer", "description": "For how many days to put this worker's IP in timeout.", "example": 7, "minimum": 1, "maximum": 30}}, "type": "object"}, "ModelInterrogationInputStable": {"properties": {"forms": {"type": "array", "items": {"$ref": "#/definitions/ModelInterrogationFormStable"}}, "source_image": {"type": "string", "description": "The public URL of the image to interrogate."}, "slow_workers": {"type": "boolean", "description": "When True, allows slower workers to pick up this request. Disabling this incurs an extra kudos cost.", "default": true}, "webhook": {"type": "string", "description": "Provide a URL where the AI Power Grid will send a POST call after each delivered generation. The request will include the details of the job as well as the request ID.", "example": "https://haidra.net/00000000-0000-0000-0000-000000000000", "minLength": 10, "maxLength": 2048}}, "type": "object"}, "ModelInterrogationFormStable": {"required": ["name"], "properties": {"name": {"type": "string", "description": "The type of interrogation this is.", "example": "caption", "enum": ["caption", "interrogation", "nsfw", "GFPGAN", "RealESRGAN_x4plus", "RealESRGAN_x2plus", "RealESRGAN_x4plus_anime_6B", "NMKD_Siax", "4x_AnimeSharp", "CodeFormers", "strip_background"]}, "payload": {"$ref": "#/definitions/ModelInterrogationFormPayloadStable"}}, "type": "object"}, "ModelInterrogationFormPayloadStable": {"properties": {"*": {"type": "object", "additionalProperties": {"type": "string"}}}, "type": "object"}, "RequestInterrogationResponse": {"properties": {"id": {"type": "string", "description": "The UUID of the request. Use this to retrieve the request status in the future."}, "message": {"type": "string", "description": "Any extra information from the horde about this request."}}, "type": "object"}, "InterrogationStatus": {"properties": {"state": {"type": "string", "title": "Interrogation State", "description": "The overall status of this interrogation."}, "forms": {"type": "array", "items": {"$ref": "#/definitions/InterrogationFormStatus"}}}, "type": "object"}, "InterrogationFormStatus": {"properties": {"form": {"type": "string", "description": "The name of this interrogation form."}, "state": {"type": "string", "title": "Interrogation State", "description": "The overall status of this interrogation."}, "result": {"$ref": "#/definitions/InterrogationFormResult"}}, "type": "object"}, "InterrogationFormResult": {"properties": {"*": {"type": "object", "additionalProperties": {"type": "object"}}}, "type": "object"}, "InterrogationPopInput": {"properties": {"name": {"type": "string", "description": "The Name of the Worker."}, "priority_usernames": {"type": "array", "items": {"type": "string", "description": "Users with priority to use this worker."}}, "forms": {"type": "array", "items": {"type": "string", "description": "The type of interrogation this worker can fulfil.", "example": "caption", "enum": ["caption", "interrogation", "nsfw", "GFPGAN", "RealESRGAN_x4plus", "RealESRGAN_x2plus", "RealESRGAN_x4plus_anime_6B", "NMKD_Siax", "4x_AnimeSharp", "CodeFormers", "strip_background"]}}, "amount": {"type": "integer", "description": "The amount of forms to pop at the same time.", "default": 1}, "bridge_agent": {"type": "string", "description": "The worker name, version and website.", "default": "unknown", "example": "AI Power Grid Worker reGen:4.1.0:https://github.com/Haidra-Org/horde-worker-reGen", "maxLength": 1000}, "threads": {"type": "integer", "description": "How many threads this worker is running. This is used to accurately the current power available in the horde.", "default": 1, "minimum": 1, "maximum": 100}, "max_tiles": {"type": "integer", "description": "The maximum amount of 512x512 tiles this worker can post-process.", "default": 16, "minimum": 1, "maximum": 256}}, "type": "object"}, "InterrogationPopPayload": {"properties": {"forms": {"type": "array", "items": {"$ref": "#/definitions/InterrogationPopFormPayload"}}, "skipped": {"$ref": "#/definitions/NoValidInterrogationsFound"}}, "type": "object"}, "InterrogationPopFormPayload": {"properties": {"id": {"type": "string", "description": "The UUID of the interrogation form. Use this to post the results in the future."}, "form": {"type": "string", "description": "The name of this interrogation form", "example": "caption", "enum": ["caption", "interrogation", "nsfw.", "GFPGAN", "RealESRGAN_x4plus", "RealESRGAN_x2plus", "RealESRGAN_x4plus_anime_6B", "NMKD_Siax", "4x_AnimeSharp", "CodeFormers", "strip_background"]}, "payload": {"$ref": "#/definitions/ModelInterrogationFormPayloadStable"}, "source_image": {"type": "string", "description": "The URL From which the source image can be downloaded."}, "r2_upload": {"type": "string", "description": "The URL in which the post-processed image can be uploaded."}}, "type": "object"}, "NoValidInterrogationsFound": {"properties": {"worker_id": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a specific worker.", "minimum": 0}, "untrusted": {"type": "integer", "description": "How many waiting requests were skipped because they demanded a trusted worker which this worker is not.", "minimum": 0}, "bridge_version": {"type": "integer", "description": "How many waiting requests were skipped because they require a higher version of the bridge than this worker is running (upgrade if you see this in your skipped list).", "example": 0, "minimum": 0}}, "type": "object"}, "PutNewFilter": {"required": ["filter_type", "regex"], "properties": {"regex": {"type": "string", "description": "The regex for this filter.", "example": "ac.*"}, "filter_type": {"type": "integer", "description": "The integer defining this filter type.", "example": 10, "minimum": 10, "maximum": 29}, "description": {"type": "string", "description": "Description about this regex."}, "replacement": {"type": "string", "description": "The replacement string for this regex.", "default": ""}}, "type": "object"}, "FilterDetails": {"required": ["filter_type", "id", "regex", "user"], "properties": {"id": {"type": "string", "description": "The UUID of this filter."}, "regex": {"type": "string", "description": "The regex for this filter.", "example": "ac.*"}, "filter_type": {"type": "integer", "description": "The integer defining this filter type.", "example": 10, "minimum": 10, "maximum": 29}, "description": {"type": "string", "description": "Description about this regex."}, "replacement": {"type": "string", "description": "The replacement string for this regex.", "default": ""}, "user": {"type": "string", "description": "The moderator which added or last updated this regex."}}, "type": "object"}, "FilterPromptSuspicion": {"required": ["suspicion"], "properties": {"suspicion": {"type": "string", "description": "Rates how suspicious the provided prompt is. A suspicion over 2 means it would be blocked.", "default": 0}, "matches": {"type": "array", "items": {"type": "string", "description": "Which words in the prompt matched the filters."}}}, "type": "object"}, "FilterRegex": {"required": ["filter_type", "regex"], "properties": {"filter_type": {"type": "integer", "description": "The integer defining this filter type.", "example": 10, "minimum": 10, "maximum": 29}, "regex": {"type": "string", "description": "The full regex for this filter type."}}, "type": "object"}, "PatchExistingFilter": {"properties": {"regex": {"type": "string", "description": "The regex for this filter.", "example": "ac.*"}, "filter_type": {"type": "integer", "description": "The integer defining this filter type.", "example": 10, "minimum": 10, "maximum": 29}, "description": {"type": "string", "description": "Description about this regex."}, "replacement": {"type": "string", "description": "The replacement string for this regex.", "default": ""}}, "type": "object"}, "StatsImgTotals": {"properties": {"minute": {"$ref": "#/definitions/SinglePeriodImgStat"}, "hour": {"$ref": "#/definitions/SinglePeriodImgStat"}, "day": {"$ref": "#/definitions/SinglePeriodImgStat"}, "month": {"$ref": "#/definitions/SinglePeriodImgStat"}, "total": {"$ref": "#/definitions/SinglePeriodImgStat"}}, "type": "object"}, "SinglePeriodImgStat": {"properties": {"images": {"type": "integer", "description": "The amount of images generated during this period."}, "ps": {"type": "integer", "description": "The amount of pixelsteps generated during this period."}}, "type": "object"}, "ImgModelStats": {"properties": {"day": {"$ref": "#/definitions/SinglePeriodImgModelStats"}, "month": {"$ref": "#/definitions/SinglePeriodImgModelStats"}, "total": {"$ref": "#/definitions/SinglePeriodImgModelStats"}}, "type": "object"}, "SinglePeriodImgModelStats": {"properties": {"*": {"type": "object", "additionalProperties": {"type": "integer", "description": "The amount of requests fulfilled for this model."}}}, "type": "object"}, "StatsTxtTotals": {"properties": {"minute": {"$ref": "#/definitions/SinglePeriodTxtStat"}, "hour": {"$ref": "#/definitions/SinglePeriodTxtStat"}, "day": {"$ref": "#/definitions/SinglePeriodTxtStat"}, "month": {"$ref": "#/definitions/SinglePeriodTxtStat"}, "total": {"$ref": "#/definitions/SinglePeriodTxtStat"}}, "type": "object"}, "SinglePeriodTxtStat": {"properties": {"requests": {"type": "integer", "description": "The amount of text requests generated during this period."}, "tokens": {"type": "integer", "description": "The amount of tokens generated during this period."}}, "type": "object"}, "TxtModelStats": {"properties": {"day": {"$ref": "#/definitions/SinglePeriodTxtModelStats"}, "month": {"$ref": "#/definitions/SinglePeriodTxtModelStats"}, "total": {"$ref": "#/definitions/SinglePeriodTxtModelStats"}}, "type": "object"}, "SinglePeriodTxtModelStats": {"properties": {"*": {"type": "object", "additionalProperties": {"type": "integer", "description": "The amount of requests fulfilled for this model."}}}, "type": "object"}, "HordeDocument": {"properties": {"html": {"type": "string", "description": "The document in html format."}, "markdown": {"type": "string", "description": "The document in markdown format."}}, "type": "object"}, "AutoWorkerTypeResponse": {"required": ["recommended_worker_type"], "properties": {"recommended_worker_type": {"type": "string", "description": "The recommended worker type ('image' or 'text')", "example": "image"}}, "type": "object"}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}}}
