{
  "openapi": "3.0.3",
  "info": {
    "title": "Runware Serverless API - Environments",
    "version": "0.6.0",
    "description": "Create the environments an organization runs apps in, set their caps and budget, and read the defaults they inherit."
  },
  "servers": [
    {
      "url": "https://api.serverless.runware.ai"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "OrgJwtAuth": []
    }
  ],
  "paths": {
    "/v1/environments": {
      "get": {
        "tags": [
          "Environments"
        ],
        "summary": "List environments",
        "description": "Returns the organization's environments, `production` first and then by name. `production` is the environment an operation targets when none is named, and it is created here when the organization does not have it yet, except for an organization whose deletion is pending. `q` narrows the list to names containing it, ignoring case. Each entry carries the values set on the environment and, under `resolved`, the values in force after inheriting the organization defaults.\n",
        "operationId": "listEnvironments",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Case-insensitive substring of the environment name. Omit to list every environment.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 63
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The organization's environments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Environments"
        ],
        "summary": "Create an environment",
        "description": "Creates an environment under a name no live environment holds; a deleted environment's name can be reused. A limit left empty inherits the organization default, a budget left empty means no cap, and `unauthenticatedAccess` left empty inherits the organization default. Returns `409` when a live environment already has the name. An organization whose deletion is pending returns `403`.\n",
        "operationId": "createEnvironment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Environment created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/v1/environments/{environmentName}": {
      "get": {
        "tags": [
          "Environments"
        ],
        "summary": "Get an environment",
        "description": "Returns one environment, with the values set on it and the values in force after inheritance. `production` is created here when the organization does not have it yet.\n",
        "operationId": "getEnvironment",
        "parameters": [
          {
            "$ref": "#/components/parameters/EnvironmentName"
          }
        ],
        "responses": {
          "200": {
            "description": "The environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Environments"
        ],
        "summary": "Update an environment's settings",
        "description": "Changes the fields the body names and leaves the rest as they are. A field sent as `null` is cleared: a limit inherits the organization default again, the budget is removed, and `unauthenticatedAccess` inherits the organization default again. The name cannot change. `production` takes every change an environment takes. An organization whose deletion is pending returns `403`.\n",
        "operationId": "updateEnvironment",
        "parameters": [
          {
            "$ref": "#/components/parameters/EnvironmentName"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Environments"
        ],
        "summary": "Delete an environment",
        "description": "Deletes an environment that has no live app, no secret and no Volume it owns that is not deleted. An environment that still has any of them answers `409`, and so does `production`, which every organization keeps. The name becomes available to a new environment; a deleted app's history still names the environment it ran in. An organization whose deletion is pending returns `403`.\n",
        "operationId": "deleteEnvironment",
        "parameters": [
          {
            "$ref": "#/components/parameters/EnvironmentName"
          }
        ],
        "responses": {
          "204": {
            "description": "Environment deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/v1/environment-defaults": {
      "get": {
        "tags": [
          "Environments"
        ],
        "summary": "Get the organization defaults",
        "description": "Returns the limits and the access setting an environment inherits for every field it leaves empty. An organization that has never set them has no caps and allows unauthenticated access. The worker and GPU caps are checked on create, on a source change to an initializing, active or failed app, on a configuration change that adds workers or GPUs or restarts a failed app, on a deploy that rolls out, and on resume, against each app's larger of its live workers and its keep-warm floor; they do not bound autoscaling. Unauthenticated access is stored but not yet enforced.\n",
        "operationId": "getEnvironmentDefaults",
        "responses": {
          "200": {
            "description": "The organization defaults",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentDefaults"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "Environments"
        ],
        "summary": "Replace the organization defaults",
        "description": "Replaces the organization defaults as a whole: a limit left out of the body means no cap. The change reaches every environment that inherits the field at once; it does not roll apps already running. An organization whose deletion is pending returns `403`.\n",
        "operationId": "putEnvironmentDefaults",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentDefaults"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The organization defaults",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentDefaults"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnvironmentList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Environment"
            }
          }
        }
      },
      "Environment": {
        "type": "object",
        "required": [
          "id",
          "name",
          "oidcSubjectPrefix",
          "isDefault",
          "budgetAlertPercents",
          "pauseAtBudget",
          "resolved",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The environment's immutable identifier, the `<environment uuid>` in an OIDC subject. It belongs to the environment, not to its name: an environment deleted and created again under the same name gets a new `id`, and so a new `oidcSubjectPrefix`.\n",
            "example": "0190a6a8-0000-7000-8000-0000000000e1"
          },
          "name": {
            "$ref": "#/components/schemas/EnvironmentName"
          },
          "oidcSubjectPrefix": {
            "type": "string",
            "description": "What the `sub` of every worker token in this environment starts with: `worker:org:<organization uuid>:env:<environment uuid>:`. It is the start of `subject` on every connector attached in the environment, so a trust rule can trust the environment before any app or connector exists. The value has no trailing `*`: for an AWS `StringLike` condition append `*`, and for a GCP attribute condition use it as is, with `assertion.sub.startsWith(...)`.\n",
            "example": "worker:org:0190a6a8-0000-7000-8000-00000000000a:env:0190a6a8-0000-7000-8000-0000000000e1:"
          },
          "isDefault": {
            "type": "boolean",
            "description": "True for `production`, the environment an operation targets when none is named. It cannot be deleted.\n"
          },
          "maxConcurrentWorkers": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Cap on the workers the environment holds, checked when a request adds capacity, as set on the environment. Empty inherits the organization default; `resolved` carries the cap in force.\n"
          },
          "maxConcurrentGpus": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Cap on the GPUs the environment holds, checked when a request adds capacity, as set on the environment. Empty inherits the organization default; `resolved` carries the cap in force.\n"
          },
          "monthlyBudget": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ],
            "nullable": true,
            "description": "Pay-as-you-go spend cap for the calendar month, which resets on the 1st at 00:00 UTC. Spend is read from settlement, which trails usage by a few minutes and a worker's end-of-life adjustment by up to about twenty, and leaves out usage a capacity commitment covers. Empty means no cap.\n"
          },
          "budgetAlertPercents": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Percentages of the budget at which the organization's users are emailed, ascending. Each is sent at most once per UTC month, even when the budget changes later in the month; percents reached together send one alert, for the highest. A `\"0.00\"` budget alerts on the first spend above zero. Empty sends no alert.\n"
          },
          "pauseAtBudget": {
            "type": "boolean",
            "description": "Whether the environment is paused once its spend this UTC month reaches the budget: its apps are stopped, and invocation and requests that add capacity are refused until the budget is raised past the spend or the month turns. A budget of zero pauses at the first spend.\n"
          },
          "unauthenticatedAccess": {
            "type": "string",
            "allOf": [
              {
                "$ref": "#/components/schemas/EnvironmentUnauthenticatedAccess"
              }
            ],
            "nullable": true,
            "description": "As set on the environment. Empty inherits the organization default; `resolved` carries the setting in force.\n"
          },
          "resolved": {
            "$ref": "#/components/schemas/EnvironmentResolved"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnvironmentName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 63,
        "pattern": "^[a-z0-9][a-z0-9._-]{0,62}$",
        "description": "Lowercase letters, digits, hyphens, underscores and periods, starting with a letter or a digit, at most 63 characters. Unique among the organization's live environments and immutable. `production` is every organization's default.\n",
        "example": "staging"
      },
      "MoneyAmount": {
        "type": "object",
        "description": "A monetary amount as an exact decimal string in the currency's major unit. Money is never represented as a float (see `GpuPricing.perSecond`).\n",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+$",
            "description": "Amount in major units as an exact decimal string.",
            "example": "312.40"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "Currency": {
        "type": "string",
        "description": "ISO 4217 alphabetic code. The platform bills in USD only.",
        "enum": [
          "USD"
        ]
      },
      "EnvironmentUnauthenticatedAccess": {
        "type": "string",
        "enum": [
          "allow"
        ],
        "description": "An environment either allows unauthenticated access to its new deployments or, when the field is empty, inherits the organization default.\n"
      },
      "EnvironmentResolved": {
        "type": "object",
        "description": "The values in force after inheritance: the environment's own value where it set one, the organization default otherwise.\n",
        "required": [
          "unauthenticatedAccess"
        ],
        "properties": {
          "maxConcurrentWorkers": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Cap on the workers the environment holds, checked when a request adds capacity. Empty means no cap."
          },
          "maxConcurrentGpus": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Cap on the GPUs the environment holds, checked when a request adds capacity. Empty means no cap."
          },
          "unauthenticatedAccess": {
            "$ref": "#/components/schemas/UnauthenticatedAccess"
          }
        }
      },
      "UnauthenticatedAccess": {
        "type": "string",
        "enum": [
          "deny",
          "allow"
        ],
        "description": "Whether a new deployment may expose its endpoints without an API key."
      },
      "ProblemDetails": {
        "type": "object",
        "description": "RFC 9457 problem details. Every error response from this API uses this schema with media type `application/problem+json`. `type` is a URI that identifies the problem class and dereferences to its documentation. Clients should switch on `type` (not `status` or `detail`, which are not stable identifiers). Additional members beyond those below may appear.\n",
        "required": [
          "type",
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "default": "about:blank",
            "description": "URI reference identifying the problem type. Dereferences to human-readable documentation. `about:blank` denotes \"no semantics beyond the HTTP status\".\n",
            "example": "https://docs.runware.ai/serverless/errors#not-found"
          },
          "title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem type (the standard HTTP status text). Stable for a given `type`. Does not change from occurrence to occurrence.\n",
            "example": "Not Found"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code generated for this occurrence.",
            "example": 404
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation specific to this occurrence.",
            "example": "No app 'img-gen' exists for the authenticated organization."
          },
          "instance": {
            "type": "string",
            "format": "uri-reference",
            "description": "URI reference identifying the specific occurrence (the request path).",
            "example": "/v1/apps/img-gen"
          },
          "requestId": {
            "type": "string",
            "description": "Extension member. Correlation id for this request, echoed in the `X-Request-Id` response header. Quote it when reporting problems.\n"
          },
          "endpointPath": {
            "type": "string",
            "description": "Extension member. Present on a `404` from task invocation when the app exists but does not declare the requested endpoint path. Its presence distinguishes an unknown endpoint from an unknown app. Carries the rejected path.\n",
            "example": "generate"
          },
          "errors": {
            "type": "array",
            "description": "Extension member. Present when the rejection names the fields it refused: on a `422`, on a `400` for a parameter or a `container.yaml` that could not be parsed, and on a `409` from `POST /v1/secret-batches` or `POST /v1/secrets/{secretName}/copy` when one or more names are already taken. One entry per field.\n",
            "items": {
              "$ref": "#/components/schemas/ProblemError"
            }
          },
          "limit": {
            "type": "string",
            "description": "The violated Shared Volume limit on a volume-limit-exceeded conflict."
          },
          "cap": {
            "type": "integer",
            "format": "int64",
            "description": "The organization's effective cap for the named limit."
          },
          "current": {
            "type": "integer",
            "format": "int64",
            "description": "The current value considered by Shared Volume admission."
          },
          "requested": {
            "type": "integer",
            "format": "int64",
            "description": "The requested value or increase, as identified by requestedIsIncrement."
          },
          "requestedIsIncrement": {
            "type": "boolean",
            "description": "Whether requested is an increase to current rather than an absolute value."
          },
          "shortfall": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ],
            "description": "Extension member. Present on an `insufficient-credit` or a `credit-suspended` problem (`402`): the amount to add to the organization's balance before retrying. The request is unchanged by the refusal and succeeds as sent once the credit is there. Read this rather than parsing `detail`.\n"
          }
        }
      },
      "ProblemError": {
        "type": "object",
        "description": "A single field-level validation error within a ProblemDetails.",
        "required": [
          "detail"
        ],
        "properties": {
          "detail": {
            "type": "string",
            "description": "Human-readable reason this field was rejected.",
            "example": "is required"
          },
          "pointer": {
            "type": "string",
            "description": "JSON Pointer (RFC 6901) to the offending field in the request body, e.g. `/configuration/maxWorkers`. Absent for non-body parameters.\n",
            "example": "/configuration/maxWorkers"
          },
          "configPointer": {
            "type": "string",
            "description": "JSON Pointer (RFC 6901) to the offending field inside a document the request carried, rather than in the request body itself: a container source's `container.yaml`. On such a rejection `pointer` names where the archive sat in the request body and this member names the field inside the document. A Dockerfile line uses the same member, as `/Dockerfile/line/{n}` with n 1-based. A rejection about the archive rather than the document carries no `configPointer`, because nothing was parsed.\n",
            "example": "/endpoints/0/path"
          }
        }
      },
      "EnvironmentCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/EnvironmentName"
          },
          "maxConcurrentWorkers": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Cap on the workers the environment holds, checked when a request adds capacity. Omit, or send `null`, to inherit the organization default.\n"
          },
          "maxConcurrentGpus": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Cap on the GPUs the environment holds, checked when a request adds capacity. Omit, or send `null`, to inherit the organization default.\n"
          },
          "monthlyBudget": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ],
            "nullable": true,
            "description": "Pay-as-you-go spend cap for the calendar month, which resets on the 1st at 00:00 UTC. USD, written with one to six decimal places (`\"500.00\"`); `\"0.00\"` is a cap reached at once. Omit, or send `null`, for no cap.\n"
          },
          "budgetAlertPercents": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Percentages of the budget at which the organization's users are emailed, each once per month. Stored ascending with duplicates removed; an empty array sends no alert. Omit for 50, 80 and 100.\n"
          },
          "pauseAtBudget": {
            "type": "boolean",
            "description": "Pause the environment once its spend this UTC month reaches the budget: stop its apps, and refuse invocation and requests that add capacity until the budget is raised past the spend or the month turns. Omit for `false`.\n"
          },
          "unauthenticatedAccess": {
            "type": "string",
            "allOf": [
              {
                "$ref": "#/components/schemas/EnvironmentUnauthenticatedAccess"
              }
            ],
            "nullable": true,
            "description": "Omit, or send `null`, to inherit the organization default."
          }
        }
      },
      "EnvironmentUpdate": {
        "type": "object",
        "additionalProperties": false,
        "description": "Every field is optional. An omitted field is left unchanged. A nullable field sent as `null` is cleared.\n",
        "properties": {
          "maxConcurrentWorkers": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Cap on the workers the environment holds, checked when a request adds capacity. `null` inherits the organization default again.\n"
          },
          "maxConcurrentGpus": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Cap on the GPUs the environment holds, checked when a request adds capacity. `null` inherits the organization default again.\n"
          },
          "monthlyBudget": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ],
            "nullable": true,
            "description": "Pay-as-you-go spend cap for the calendar month, which resets on the 1st at 00:00 UTC. USD, written with one to six decimal places (`\"500.00\"`); `\"0.00\"` is a cap reached at once. `null` removes the cap.\n"
          },
          "budgetAlertPercents": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Percentages of the budget at which the organization's users are emailed, each once per month. Stored ascending with duplicates removed; an empty array sends no alert.\n"
          },
          "pauseAtBudget": {
            "type": "boolean",
            "description": "Pause the environment once its spend this UTC month reaches the budget: stop its apps, and refuse invocation and requests that add capacity until the budget is raised past the spend or the month turns.\n"
          },
          "unauthenticatedAccess": {
            "type": "string",
            "allOf": [
              {
                "$ref": "#/components/schemas/EnvironmentUnauthenticatedAccess"
              }
            ],
            "nullable": true,
            "description": "`null` inherits the organization default again."
          }
        }
      },
      "EnvironmentDefaults": {
        "type": "object",
        "additionalProperties": false,
        "description": "The organization defaults every environment inherits for the fields it leaves empty.\n",
        "required": [
          "unauthenticatedAccess"
        ],
        "properties": {
          "maxConcurrentWorkers": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Worker cap of an environment that sets none of its own, checked when a request adds capacity. Empty means no cap.\n"
          },
          "maxConcurrentGpus": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "GPU cap of an environment that sets none of its own, checked when a request adds capacity. Empty means no cap.\n"
          },
          "unauthenticatedAccess": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UnauthenticatedAccess"
              }
            ],
            "description": "Whether a new deployment in an environment that sets nothing of its own may expose its endpoints without an API key.\n"
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid credentials",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "unauthorized": {
                "summary": "No usable credential",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#unauthorized",
                  "title": "Unauthorized",
                  "status": 401,
                  "detail": "Missing or invalid credentials"
                }
              }
            }
          }
        }
      },
      "ValidationError": {
        "description": "The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns `400`. The `errors` array carries one entry per offending field.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "unprocessable-entity": {
                "summary": "A field broke the schema",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#unprocessable-entity",
                  "title": "Unprocessable Entity",
                  "status": 422,
                  "detail": "/configuration/maxWorkers: number must be at least 1",
                  "errors": [
                    {
                      "detail": "number must be at least 1",
                      "pointer": "/configuration/maxWorkers"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "internal-server-error": {
                "summary": "Unexpected failure",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#internal-server-error",
                  "title": "Internal Server Error",
                  "status": 500,
                  "detail": "Internal Server Error"
                }
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "A required service is temporarily unavailable",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "service-unavailable": {
                "summary": "A dependency is temporarily unreachable",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#service-unavailable",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "Authentication service is temporarily unavailable"
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns `422` instead.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "bad-request": {
                "summary": "The request could not be parsed",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#bad-request",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "request body is not valid JSON"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated but not permitted to access this resource",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "forbidden": {
                "summary": "Not permitted",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#forbidden",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "not permitted to access this resource"
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "Resource already exists or the request conflicts with its current state",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "conflict": {
                "summary": "The resource's state refuses the request",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#conflict",
                  "title": "Conflict",
                  "status": 409,
                  "detail": "a rollout is already in progress"
                }
              }
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "The request body exceeds its size limit: 10 MiB on `invoke-sync` and `invoke-async`, whose body carries the endpoint's payload, and 1 MiB on the other operations that answer with this response. `detail` names the limit in bytes.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "request-entity-too-large": {
                "summary": "The body is over its limit",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#request-entity-too-large",
                  "title": "Request Entity Too Large",
                  "status": 413,
                  "detail": "request body exceeds its size limit of 1048576 bytes"
                }
              }
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "The request body arrived with a Content-Type this operation does not accept. The body was not decoded, so this is not a schema failure. A body of `application/json` that cannot be parsed returns `400`. One that parses and breaks the schema returns `422`. A body sent with no Content-Type is the same refusal.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "unsupported-media-type": {
                "summary": "The body was not JSON",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#unsupported-media-type",
                  "title": "Unsupported Media Type",
                  "status": 415,
                  "detail": "Content-Type \"text/plain\" is not supported"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "not-found": {
                "summary": "The resource does not exist",
                "value": {
                  "type": "https://docs.runware.ai/serverless/errors#not-found",
                  "title": "Not Found",
                  "status": 404,
                  "detail": "app not found"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "EnvironmentName": {
        "name": "environmentName",
        "in": "path",
        "required": true,
        "description": "Name of one of the authenticated organization's live environments.",
        "schema": {
          "$ref": "#/components/schemas/EnvironmentName"
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Runware API key supplied as a bearer token. Validated server-to-server against the existing Runware platform. The key identifies the organization.\n"
      },
      "OrgJwtAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Org-scoped JWT supplied as a bearer token, minted by the Runware platform for one user acting in one organization and verified locally against the platform's published JWKS. Serves the web app. The CLI and SDK use ApiKeyAuth.\n"
      }
    }
  }
}