{
  "openapi": "3.1.1",
  "info": {
    "title": "Quality Control API",
    "description": "Automated checks on video, audio and text before delivery.",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "{{API_BASE_URL}}",
      "description": "Your API environment"
    }
  ],
  "tags": [
    {
      "name": "Checks"
    },
    {
      "name": "Decisions"
    },
    {
      "name": "Image fixes"
    },
    {
      "name": "Regions"
    },
    {
      "name": "Rules"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Review"
    }
  ],
  "paths": {
    "/v1/galaxy/quality-control/classification/classify": {
      "post": {
        "operationId": "check-an-image-from-a-url",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyImageUrlDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A field failed validation, or:\n\n- `At least one of runNsfw / runRegional must be enabled.`: both checks were turned off.\n- `The image URL must be a public https:// address.`\n- `The image is larger than the <n>-byte limit.` or `Image is <n> bytes, exceeding the <max>-byte limit.`\n- `Could not download the image (HTTP <status>).`, `Could not download the image: the download timed out.` or `Could not download the image.`\n- `The image URL did not return a supported image (got \"<type>\").`: only JPEG, PNG, WebP and AVIF are accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check an image from a URL",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts, at the image rate. If the NSFW screen blocks the image, the region check does not run and the price is lowered to a fifth of the image rate when the check finishes. Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Image QC | Quality-control check of an image. | 150 credits per image |",
            "position": "after-description"
          }
        ],
        "description": "Download an image from a public `https://` URL and check it: the NSFW screen, then each region in `regionIds`. Returns a `jobId` straight away; poll Get a check for the verdict. Images take a few seconds.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-asset": {
      "post": {
        "description": "Check an image, audio or video file that is already in your organization's assets, without uploading it again. Set `modality` to the kind of check. The file is copied, so later changes to it do not affect the check. Returns a `jobId` straight away; poll Get a check.",
        "operationId": "check-a-file-from-your-assets",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyFromAssetDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A field failed validation, or:\n\n- `At least one of runNsfw / runRegional must be enabled.`: both checks were turned off.\n- `That file is no longer available in Assets.`: `assetId` is not a file in your organization.\n- `Could not read that file from Assets. Try uploading it directly.`\n- `Image is <n> bytes, exceeding the <max>-byte limit.`: images can be up to 8 MB.\n- `We couldn't read this file's length`: the length could not be measured and no `durationSeconds` was sent, so the check cannot be priced.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check a file from your assets",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts. An image at the image rate; audio and video for their measured length, per minute (video with `scope: audio` at the audio rate). The price is corrected to what actually ran when the check finishes. Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Image QC | Quality-control check of an image. | 150 credits per image |\n| Audio QC | Quality-control check of audio. Charged per minute. | 150 credits per minute |\n| Video QC | Quality-control check of video. Charged per minute. | 300 credits per minute |",
            "position": "after-description"
          }
        ],
        "x-orbitdocs-order": 6,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-audio": {
      "post": {
        "operationId": "check-audio",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The audio file to check, up to 128 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: audio`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "durationSeconds": {
                    "type": "number",
                    "description": "The file's length in seconds, if you know it. Used to price the check only when we cannot measure the file.",
                    "examples": [
                      42.5
                    ]
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The audio file to check, up to 128 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: audio`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "durationSeconds": {
                    "type": "number",
                    "description": "The file's length in seconds, if you know it. Used to price the check only when we cannot measure the file.",
                    "examples": [
                      42.5
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A field failed validation, or:\n\n- `At least one of runNsfw / runRegional must be enabled.`: both checks were turned off.\n- `No file uploaded.`: neither the `file` field nor `uploadKey` was sent.\n- `regionIds is required.`, `regionIds must contain at least one id.`, `regionIds may contain at most 50 ids.` or `regionIds must all be UUID v4.`\n- `The upload could not be found. Please try uploading the file again.`, `The upload did not complete. Please try uploading the file again.` or `That upload was already used. Please upload the file again.`: `uploadKey` is not a finished, unused upload of your organization.\n- `That upload isn't a <kind of file> this step takes.`: `uploadKey` was issued for another check.\n- `We couldn't read this file's length`: the length could not be measured and no `durationSeconds` was sent, so the check cannot be priced.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "The file is larger than 128 MB (`File too large`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 413,
                      "message": "Payload Too Large"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check audio",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts, for the measured length per minute. Corrected to the length the check actually processed when it finishes. Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Audio QC | Quality-control check of audio. Charged per minute. | 150 credits per minute |",
            "position": "after-description"
          }
        ],
        "description": "Upload an audio file in the `file` field (`multipart/form-data`). The speech is transcribed and the transcript is checked against each region in `regionIds`. Or put the file in storage first with Get an upload URL (`kind: audio`) and send its `uploadKey` instead of `file`, in a JSON body with the same fields. Returns a `jobId` straight away; poll Get a check. Longer files take longer.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-text": {
      "post": {
        "operationId": "check-text",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyTextDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged: a field failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check text",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts, per word of `text` (Unicode words, like every word count on the platform; Chinese, Japanese, Korean and Thai text is counted by characters, at 2.8 / 3 / 3.3 / 6 characters a word). Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Text QC | Quality-control check of text content. Charged per word. | 2 credits per word |",
            "position": "after-description"
          }
        ],
        "description": "Check up to 50,000 characters of text against each region in `regionIds`. Text has no NSFW screen. Returns a `jobId` straight away; poll Get a check.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-text/word-count": {
      "post": {
        "operationId": "count-billable-words",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountTextWordsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The billable words of the text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextWordCountResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation: `text` is missing, empty or longer than 50,000 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Count billable words",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\nFree. Check text is charged per word of this count: Unicode words, like every word count on the platform; Chinese, Japanese, Korean and Thai text is counted by characters, at 2.8 / 3 / 3.3 / 6 characters a word. Text with no word at all (only emoji or punctuation) counts as 1.",
            "position": "after-description"
          }
        ],
        "description": "Count the billable words of a text before checking it. Send the `text` you would send to Check text. Nothing is created or charged, and the call does not count towards your per-minute check limit.",
        "x-orbitdocs-order": 9,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-upload": {
      "post": {
        "operationId": "check-an-uploaded-image",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The image to check, up to 8 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: image`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "runNsfw": {
                    "type": "boolean",
                    "default": true,
                    "description": "Run the NSFW screen. Defaults to true; `false`, `0`, `no` or an empty value turn it off.",
                    "examples": [
                      true
                    ]
                  },
                  "runRegional": {
                    "type": "boolean",
                    "default": true,
                    "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be on.",
                    "examples": [
                      true
                    ]
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The image to check, up to 8 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: image`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "runNsfw": {
                    "type": "boolean",
                    "default": true,
                    "description": "Run the NSFW screen. Defaults to true; `false`, `0`, `no` or an empty value turn it off.",
                    "examples": [
                      true
                    ]
                  },
                  "runRegional": {
                    "type": "boolean",
                    "default": true,
                    "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be on.",
                    "examples": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A field failed validation, or:\n\n- `At least one of runNsfw / runRegional must be enabled.`: both checks were turned off.\n- `No file uploaded.`: neither the `file` field nor `uploadKey` was sent.\n- `regionIds is required.`, `regionIds must contain at least one id.`, `regionIds may contain at most 50 ids.` or `regionIds must all be UUID v4.`\n- `The upload could not be found. Please try uploading the file again.`, `The upload did not complete. Please try uploading the file again.` or `That upload was already used. Please upload the file again.`: `uploadKey` is not a finished, unused upload of your organization.\n- `That upload isn't a <kind of file> this step takes.`: `uploadKey` was issued for another check.\n- `Image is <n> bytes, exceeding the <max>-byte limit.`: images can be up to 8 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "The file is larger than 32 MB (`File too large`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 413,
                      "message": "Payload Too Large"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check an uploaded image",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts, at the image rate. If the NSFW screen blocks the image, the price is lowered to a fifth of the image rate when the check finishes. Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Image QC | Quality-control check of an image. | 150 credits per image |",
            "position": "after-description"
          }
        ],
        "description": "Upload an image in the `file` field (`multipart/form-data`) and check it. Other fields are form fields: send `regionIds` as a JSON array or a comma-separated list. Or put the image in storage first with Get an upload URL (`kind: image`) and send its `uploadKey` instead of `file`, in a JSON body with the same fields. Returns a `jobId` straight away; poll Get a check.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/classify-video": {
      "post": {
        "operationId": "check-video",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The video to check, up to 512 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: video`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "runNsfw": {
                    "type": "boolean",
                    "default": true,
                    "description": "Run the NSFW screen. Defaults to true; `false`, `0`, `no` or an empty value turn it off.",
                    "examples": [
                      true
                    ]
                  },
                  "runRegional": {
                    "type": "boolean",
                    "default": true,
                    "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be on.",
                    "examples": [
                      true
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "video",
                      "audio",
                      "both"
                    ],
                    "default": "both",
                    "description": "`video` checks the frames, `audio` checks the transcribed speech, `both` (the default) checks both.",
                    "examples": [
                      "both"
                    ]
                  },
                  "durationSeconds": {
                    "type": "number",
                    "description": "The file's length in seconds, if you know it. Used to price the check only when we cannot measure the file.",
                    "examples": [
                      42.5
                    ]
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "regionIds"
                ],
                "properties": {
                  "file": {
                    "contentMediaType": "application/octet-stream",
                    "description": "The video to check, up to 512 MB. Leave it out when you send `uploadKey`."
                  },
                  "uploadKey": {
                    "type": "string",
                    "description": "Instead of `file`: the `uploadKey` from Get an upload URL with `kind: video`, once the file is in storage. Send it, with the other fields, in a JSON body. It can be used once.",
                    "examples": [
                      "1f0c…/staged-uploads/7b9e….mp4"
                    ]
                  },
                  "regionIds": {
                    "type": "string",
                    "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs. In a form, a JSON array or separated by commas; in a JSON body, an array.",
                    "examples": [
                      "[\"5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f\"]"
                    ]
                  },
                  "culturalProvider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google"
                    ],
                    "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
                    "examples": [
                      "anthropic"
                    ]
                  },
                  "context": {
                    "type": "string",
                    "description": "Your own metadata as a JSON object, stored with the decision. Ignored if it is not valid JSON.",
                    "examples": [
                      "{\"campaign\":\"summer-sale-2026\"}"
                    ]
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Project to file this check under; omit for none. See List projects.",
                    "examples": [
                      "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
                    ]
                  },
                  "runNsfw": {
                    "type": "boolean",
                    "default": true,
                    "description": "Run the NSFW screen. Defaults to true; `false`, `0`, `no` or an empty value turn it off.",
                    "examples": [
                      true
                    ]
                  },
                  "runRegional": {
                    "type": "boolean",
                    "default": true,
                    "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be on.",
                    "examples": [
                      true
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "video",
                      "audio",
                      "both"
                    ],
                    "default": "both",
                    "description": "`video` checks the frames, `audio` checks the transcribed speech, `both` (the default) checks both.",
                    "examples": [
                      "both"
                    ]
                  },
                  "durationSeconds": {
                    "type": "number",
                    "description": "The file's length in seconds, if you know it. Used to price the check only when we cannot measure the file.",
                    "examples": [
                      42.5
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The check was charged and queued. Poll it with Get a check until `status` is `succeeded` or `failed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartCheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Nothing was charged. A field failed validation, or:\n\n- `At least one of runNsfw / runRegional must be enabled.`: both checks were turned off.\n- `No file uploaded.`: neither the `file` field nor `uploadKey` was sent.\n- `regionIds is required.`, `regionIds must contain at least one id.`, `regionIds may contain at most 50 ids.` or `regionIds must all be UUID v4.`\n- `The upload could not be found. Please try uploading the file again.`, `The upload did not complete. Please try uploading the file again.` or `That upload was already used. Please upload the file again.`: `uploadKey` is not a finished, unused upload of your organization.\n- `That upload isn't a <kind of file> this step takes.`: `uploadKey` was issued for another check.\n- `scope must be one of \"video\", \"audio\", \"both\" (got \"<value>\").`\n- `We couldn't read this file's length`: the length could not be measured and no `durationSeconds` was sent, so the check cannot be priced.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for this check, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "The file is larger than 512 MB (`File too large`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 413,
                      "message": "Payload Too Large"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Your organization's per-minute limit for this kind of check (from Get settings) was reached: `Rate limit exceeded for <kind> (<n>/min). Retry in <s>s.`, with the wait in `retry_after_sec`. Separate from the per-key limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Check video",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when the check starts, for the measured length per minute: at the video rate, or the audio rate with `scope: audio`. Corrected to what actually ran when the check finishes (a video the NSFW screen blocks is billed at the audio rate). Refunded in full if the check fails on our side, including when a region in `regionIds` is not in your organization.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Video QC | Quality-control check of video. Charged per minute. | 300 credits per minute |\n| Audio QC | Quality-control check of audio. Charged per minute. | 150 credits per minute |",
            "position": "after-description"
          }
        ],
        "description": "Upload a video in the `file` field (`multipart/form-data`). Frames are sampled for the NSFW screen and the region check, and the speech is transcribed and checked too. Use `scope` to check only the picture (`video`) or only the speech (`audio`). Or put the video in storage first with Get an upload URL (`kind: video`) and send its `uploadKey` instead of `file`, in a JSON body with the same fields. Returns a `jobId` straight away; poll Get a check.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions": {
      "get": {
        "operationId": "list-decisions",
        "parameters": [
          {
            "name": "projectId",
            "required": false,
            "in": "query",
            "description": "Only decisions whose check is in this project (a project ID). Pass `none` for checks in no project.",
            "schema": {
              "type": "string",
              "examples": [
                "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Decisions per page, from 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number",
              "examples": [
                20
              ]
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "How many decisions to skip.",
            "schema": {
              "minimum": 0,
              "default": 0,
              "type": "number",
              "examples": [
                0
              ]
            }
          },
          {
            "name": "scope",
            "required": false,
            "in": "query",
            "description": "`personal` lists only checks started by the member who owns the API key; `org` (the default) lists everyone's. Always `personal` when that member's role has Personal view turned on.",
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "org"
              ],
              "examples": [
                "org"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of decisions, with the total count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List decisions",
        "tags": [
          "Decisions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Every finished check leaves a decision. Lists them newest first, with the verdict, a score per region and any reviewer ruling. Page with `limit` and `offset`.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}": {
      "get": {
        "operationId": "get-a-decision",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The decision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionDetailDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No decision with this `id` in your organization, or it was deleted (`Decision <id> not found`). Also returned when your role only sees its own checks and someone else started this one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a decision",
        "tags": [
          "Decisions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One decision in full: every rule score with the reason for it, findings no rule covers, the transcript for audio and video, what it cost and any reviewer ruling.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}/fix": {
      "post": {
        "operationId": "fix-an-image",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixImageDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The fix was charged and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartImageFixResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the fix, or your organization owes credits. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist, or you cannot see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Fix an image",
        "tags": [
          "Image fixes"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\n**Credits:** A flat price per fix, charged when you start it. Refunded in full if the fix fails.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Image Fix | Generating a compliant version of a flagged image. | 300 credits |",
            "position": "after-description"
          }
        ],
        "description": "Make an edited version of a checked image that addresses one region's flagged rules and findings. Image decisions only. Returns a `jobId` straight away; poll Get an image fix (it usually takes 15 to 60 seconds). The decision and region are checked once the job runs: if the decision is not an image, the region was not part of it, or it has nothing flagged, the job fails and is refunded.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}/fixes": {
      "get": {
        "operationId": "list-image-fixes",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The fixes. Empty when the decision has none or is not in your organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageFixListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist, or you cannot see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List image fixes",
        "tags": [
          "Image fixes"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "The fixed images already made for a decision, newest first (up to 20), each with the image inline as base64.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}/frames": {
      "get": {
        "operationId": "list-video-frames",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Return at most this many frames, from the start. Leave it out for all of them.",
            "schema": {
              "type": "number",
              "examples": [
                1
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The frames, in order. Empty for decisions that are not video.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionFramesResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No decision with this `id` in your organization (`Decision <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List video frames",
        "tags": [
          "Decisions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Short-lived links to the frames sampled from a checked video, with their position in seconds. Each link works for at least 5 minutes. Pass `limit=1` for just the first frame, for a thumbnail.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}/image": {
      "get": {
        "operationId": "get-a-decision-image",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          },
          {
            "name": "variant",
            "required": false,
            "in": "query",
            "description": "`processed` (the default) or `original`. Checks started through the API store only the original, so both return it.",
            "schema": {
              "enum": [
                "processed",
                "original"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The signed URL, or null when nothing is stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionImageUrlResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No decision with this `id` in your organization (`Decision <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a decision image",
        "tags": [
          "Decisions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "A short-lived link to the image that was checked. It works for at least 5 minutes, without your API key.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/decisions/{id}/media": {
      "get": {
        "operationId": "get-decision-media",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The signed URL and its content type, or nulls when nothing is stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionMediaUrlResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No decision with this `id` in your organization (`Decision <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get decision media",
        "tags": [
          "Decisions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "A short-lived link to the audio or video that was checked, served with a playable content type. It works for at least 5 minutes, without your API key.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/fix-jobs/{id}": {
      "get": {
        "operationId": "get-an-image-fix",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Image-fix job ID (`jobId`) returned by Fix an image.",
            "schema": {
              "type": "string",
              "examples": [
                "2a4c6e8f-1b3d-4f5a-8c7e-9d1f3a5c7e9b"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image-fix job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageFixJobResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No image-fix job with this `id` in your organization (`Fix job <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get an image fix",
        "tags": [
          "Image fixes"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Status of an image fix, and the fixed image once `status` is `succeeded`: inline as base64 and as a link valid for at least 5 minutes.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/jobs/{id}": {
      "get": {
        "operationId": "get-a-check",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Check ID (`jobId`) returned when you started the check.",
            "schema": {
              "type": "string",
              "examples": [
                "3f9c2b1e-7a4d-4c6b-9e2f-1a8b7c6d5e4f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The check.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No check with this `id` in your organization (`Job <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a check",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Status of a check, and its outcome once `status` is `succeeded`: the overall `verdict`, the NSFW result and a score per region in `result`. Poll every few seconds for images and text, and every 10 to 30 seconds for audio and video.",
        "x-orbitdocs-order": 7,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/jobs/{id}/project": {
      "patch": {
        "operationId": "move-a-check-to-a-project",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Check ID (`jobId`) returned when you started the check.",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3f9c2b1e-7a4d-4c6b-9e2f-1a8b7c6d5e4f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveCheckToProjectBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The check was moved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MoveCheckToProjectResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`id` is not a UUID (`Validation failed (uuid is expected)`), or `projectId` is not a UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`projectId` is not a project in your organization (`Project not found`), or there is no check with this `id` (`Classification job not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Move a check to a project",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "File a check under a project. Pass `projectId: null` to unassign. Projects only organize checks; they never change who can see them.",
        "x-orbitdocs-order": 8,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/classification/upload/presign": {
      "post": {
        "operationId": "get-an-upload-url",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QcUploadPresignDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Where to `PUT` the file, and the key to send to the check.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagedUploadTicketDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, the file is empty or over the limit of its check (an image 8 MB, audio 128 MB, video 512 MB), or it is not a file that check takes: an image `.png`, `.jpg`, `.jpeg`, `.webp` or `.avif`; audio `.mp3`, `.wav`, `.m4a`, `.aac`, `.ogg`, `.oga`, `.opus`, `.flac`, `.weba` or `.wma`; video `.mp4`, `.m4v`, `.mov`, `.webm`, `.mkv`, `.avi`, `.wmv`, `.mpg`, `.mpeg` or `.3gp`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "You asked for 300 upload URLs in the last hour, or have 5 GB of uploads not used yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get an upload URL",
        "tags": [
          "Checks"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.classification:create`. An API key acts with the role of the member who created it.\n\nFree. The check you send the upload to is charged when it starts.",
            "position": "after-description"
          }
        ],
        "description": "Put a file in storage before you check it, instead of sending it in a multipart form. Send the file's `fileName`, `contentType` and exact `size`, and `kind`: `image`, `audio` or `video`. `PUT` the file to `uploadUrl` with exactly the `headers` returned, within 10 minutes and without your API key. Then send `uploadKey`, with the other fields, in a JSON body to Check an uploaded image, Check audio or Check video. An upload can be used once; one not used within a day is deleted.",
        "x-orbitdocs-order": 0,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/region": {
      "get": {
        "operationId": "list-regions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Every region.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RegionWithRuleCountDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List regions",
        "tags": [
          "Regions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your organization's regions (markets), sorted by name, each with its number of rules. The first time an organization lists regions and has none, a default set of regions and rules is created for it.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "create-a-region",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRegionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new region.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a region",
        "tags": [
          "Regions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Add a region (a market or audience) with a pass mark. Then add its rules. Content is checked against the regions you name in `regionIds`.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/region/{id}": {
      "get": {
        "operationId": "get-a-region",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The region.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get a region",
        "tags": [
          "Regions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "One region by its `id`.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "update-a-region",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRegionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated region.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a region",
        "tags": [
          "Regions"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change a region's name, description or pass mark. Send only the fields to change. Decisions already made keep the threshold they were scored with.",
        "x-orbitdocs-order": 4,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/region/{id}/rules": {
      "get": {
        "operationId": "list-rules",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The region's rules.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RuleDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List rules",
        "tags": [
          "Rules"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "A region's rules, oldest first.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "add-a-rule",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRuleDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Add a rule",
        "tags": [
          "Rules"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:create`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Add a rule to a region. The `description` is given to the model as is, so state plainly what must not appear. `contentTypes` decides which kinds of content the rule is checked on (image only if you leave it out).",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/region/{id}/rules/{ruleId}": {
      "patch": {
        "operationId": "update-a-rule",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          },
          {
            "name": "ruleId",
            "required": true,
            "in": "path",
            "description": "ID of the rule, from List rules.",
            "schema": {
              "type": "string",
              "examples": [
                "9e1a3c5b-7d2f-4b4a-9c6e-8f0a2b4d6c8e"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRuleDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`), or the region has no rule with this `ruleId` (`Rule <ruleId> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Update a rule",
        "tags": [
          "Rules"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Change a rule. Send only the fields to change. Applies to checks started from now on.",
        "x-orbitdocs-order": 3,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/region/{id}/rules/auto-generate": {
      "post": {
        "operationId": "suggest-rules-with-ai",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "ID of the region, from List regions.",
            "schema": {
              "type": "string",
              "examples": [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoGenerateRulesDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The proposed rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleCandidatesResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A field failed validation, or: `AI rule generation needs an OpenAI key — set one in Org settings (or the platform env).`, or `AI rule generation failed. Try again.` (refunded).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for the rules you asked for, or your organization owes credits. Nothing was generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No region with this `id` in your organization (`Region <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Suggest rules with AI",
        "tags": [
          "Rules"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.region:create`. An API key acts with the role of the member who created it.\n\n**Credits:** Charged when you call it, for the `count` you ask for; lowered to the number of rules actually returned (nothing if none). Refunded in full if generation fails.\n\n| Rate | What it covers | Price |\n| --- | --- | --- |\n| Region rule generation | AI-generating candidate compliance rules for a region. Charged per generated rule. | 20 credits per rule |",
            "position": "after-description"
          }
        ],
        "description": "Ask the AI for up to 10 new rules for a region, based on its name and avoiding its existing rules. Nothing is saved: review the `candidates` and add the ones you want with Add a rule. Waits for the model, so it can take several seconds.",
        "x-orbitdocs-order": 5,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/review/decisions/{id}/adjudicate": {
      "post": {
        "operationId": "rule-on-a-decision",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Decision ID: `result.decisionId` of a finished check, or `decisionId` from List decisions.",
            "schema": {
              "type": "string",
              "examples": [
                "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjudicateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The ruling.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdjudicationDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No decision with this `id` in your organization (`Decision <id> not found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 404,
                      "message": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Rule on a decision",
        "tags": [
          "Review"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.review:update`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Record a person's ruling on a decision: `approve` accepts the content despite the verdict, `reject` confirms it is not acceptable. A decision has one ruling; calling again replaces it. The model's `verdict` is kept unchanged and the ruling is shown next to it in `adjudication`.",
        "x-orbitdocs-order": 2,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/review/queue": {
      "get": {
        "operationId": "list-the-review-queue",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Decisions per page, from 1 to 100.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number",
              "examples": [
                20
              ]
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "How many decisions to skip.",
            "schema": {
              "minimum": 0,
              "default": 0,
              "type": "number",
              "examples": [
                0
              ]
            }
          },
          {
            "name": "includeAdjudicated",
            "required": false,
            "in": "query",
            "description": "Also list decisions that already have a ruling. By default they are left out.",
            "schema": {
              "default": false,
              "type": "boolean",
              "examples": [
                false
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of flagged decisions, with the total count.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewQueueResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 400,
                      "message": [
                        "email must be an email"
                      ],
                      "error": "Bad Request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List the review queue",
        "tags": [
          "Review"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.review:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Decisions with a `REVIEW` or `BLOCKED` verdict that nobody has ruled on yet, newest first. Pass `includeAdjudicated=true` to include ruled ones. Page with `limit` and `offset`.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/galaxy/quality-control/settings": {
      "get": {
        "operationId": "get-settings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QcSettingsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "The `x-api-key` header is missing, or the key is invalid, expired or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 401,
                      "message": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 403,
                      "message": "Forbidden resource",
                      "error": "Forbidden"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 429,
                      "message": "ThrottlerException: Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "statusCode": 500,
                      "message": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Get settings",
        "tags": [
          "Settings"
        ],
        "x-orbitdocs-content": [
          {
            "markdown": "**Permission:** `quality_control.settings:read`. An API key acts with the role of the member who created it.",
            "position": "after-description"
          }
        ],
        "description": "Your organization's Quality Control settings: the default AI provider for region checks, the NSFW block threshold and the per-minute limits on starting checks. The defaults are created the first time you read them.",
        "x-orbitdocs-order": 1,
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys."
      }
    },
    "schemas": {
      "AdditionalFindingDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Short name of the problem.",
            "examples": [
              "Left-hand gesture"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "How serious it is: `low`, `med` or `high`.",
            "examples": [
              "med"
            ]
          },
          "score": {
            "type": "number",
            "description": "Compliance score for this finding, from 0 to 100.",
            "examples": [
              60
            ]
          },
          "rationale": {
            "type": "string",
            "description": "Why the model raised it.",
            "examples": [
              "The model offers food with the left hand."
            ]
          },
          "suggested_rule_description": {
            "type": "string",
            "description": "A rule description you could add to the region so future checks look for this. Empty when there is none.",
            "examples": [
              "Do not show food or gifts being offered with the left hand."
            ]
          }
        },
        "required": [
          "title",
          "severity",
          "score",
          "rationale",
          "suggested_rule_description"
        ]
      },
      "AdjudicateDto": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "reject"
            ],
            "description": "`approve` accepts the content and overrides the verdict; `reject` confirms it is not acceptable.",
            "examples": [
              "approve"
            ]
          },
          "notes": {
            "type": "string",
            "description": "Why you ruled this way (up to 2,000 characters).",
            "examples": [
              "Beer brand is a licensed partner in this market."
            ]
          }
        },
        "required": [
          "action"
        ]
      },
      "AdjudicationDto": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "reject"
            ],
            "description": "`approve` overrides the verdict and accepts the content; `reject` confirms it is not acceptable.",
            "examples": [
              "approve"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reviewer's notes, or null.",
            "examples": [
              "Beer brand is a licensed partner in this market."
            ]
          },
          "fk_memberId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the member who made the latest ruling.",
            "examples": [
              "1c3e5a7b-9d2f-4a4c-8e6b-0f2d4a6c8e0b"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the decision was first ruled on (ISO 8601). Changing the ruling later does not change it.",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "action",
          "notes",
          "fk_memberId",
          "createdAt"
        ]
      },
      "AutoGenerateRulesDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number",
            "minimum": 1,
            "maximum": 10,
            "default": 10,
            "description": "How many rules to propose, from 1 to 10. Defaults to 10.",
            "examples": [
              5
            ]
          }
        }
      },
      "CheckResponseDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the check.",
            "examples": [
              "3f9c2b1e-7a4d-4c6b-9e2f-1a8b7c6d5e4f"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What is being checked.",
            "examples": [
              "video"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SCHEDULED",
              "RUNNING",
              "PAUSED",
              "COMPLETED",
              "COMPLETED_WITH_ERRORS",
              "FAILED",
              "TIMED_OUT",
              "TERMINATED"
            ],
            "description": "`queued`, `running`, `succeeded` or `failed`. The last two are final.",
            "examples": [
              "COMPLETED"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "decoding",
              "transcribing",
              "scoring"
            ],
            "description": "Step in progress while `running`, when known: `decoding`, `transcribing` or `scoring`. Null otherwise.",
            "examples": [
              null
            ]
          },
          "regionIds": {
            "description": "The regions the content is checked against.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            ]
          },
          "transcript": {
            "type": [
              "string",
              "null"
            ],
            "description": "Transcript of the speech, for audio and video checks that transcribe. Null otherwise.",
            "examples": [
              "Welcome to our summer sale. Everything is half price."
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the check failed. Null unless `status` is `failed`.",
            "examples": [
              null
            ]
          },
          "result": {
            "description": "The outcome, once `status` is `succeeded`. Null before that.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/ClassifyResultDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the check was started (ISO 8601).",
            "examples": [
              "2026-10-04T09:29:41.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the check last changed (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "jobId",
          "modality",
          "status",
          "stage",
          "regionIds",
          "transcript",
          "error",
          "result",
          "createdAt",
          "updatedAt"
        ]
      },
      "ClassifyFromAssetDto": {
        "type": "object",
        "properties": {
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "audio",
              "video"
            ],
            "description": "What kind of check to run on the file: `image`, `audio` or `video`. Use Check text for text.",
            "examples": [
              "video"
            ]
          },
          "assetId": {
            "type": "string",
            "description": "ID of a file in your organization's assets (a UUID v4). It is copied, so later changes to the original do not affect the check.",
            "examples": [
              "4c7e2a90-5b1d-4f3e-9a6c-2d8b1e0f7a35"
            ]
          },
          "regionIds": {
            "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            ]
          },
          "runNsfw": {
            "type": "boolean",
            "default": true,
            "description": "Run the NSFW screen. Defaults to true. A blocked image or video is not checked against your regions.",
            "examples": [
              true
            ]
          },
          "runRegional": {
            "type": "boolean",
            "default": true,
            "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be true, except for audio and audio-only video. Image checks always run the region check when the NSFW screen lets the image through.",
            "examples": [
              true
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "video",
              "audio",
              "both"
            ],
            "description": "Video only: `video` checks the frames, `audio` checks the transcribed speech, `both` (the default) checks both. An audio-only video is charged at the audio rate.",
            "examples": [
              "both"
            ]
          },
          "durationSeconds": {
            "type": "number",
            "description": "Audio and video only: the file's length in seconds, if you know it. Used to price the check only when we cannot measure the file.",
            "examples": [
              42.5
            ]
          },
          "culturalProvider": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
            "examples": [
              "anthropic"
            ]
          },
          "context": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own metadata, stored with the decision. Keys starting with `_` are reserved and may be overwritten.",
            "examples": [
              {
                "campaign": "summer-sale-2026",
                "market": "ksa"
              }
            ]
          },
          "projectId": {
            "type": "string",
            "description": "Project to file this check under; omit for none. See List projects. It only organizes checks; it never changes who can see them.",
            "format": "uuid",
            "examples": [
              "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
            ]
          }
        },
        "required": [
          "modality",
          "assetId",
          "regionIds"
        ]
      },
      "ClassifyImageUrlDto": {
        "type": "object",
        "properties": {
          "imageUrl": {
            "type": "string",
            "description": "Public `https://` URL of a JPEG, PNG, WebP or AVIF image, up to 8 MB. It must download within 5 seconds.",
            "examples": [
              "https://cdn.example.com/campaigns/summer-banner.png"
            ]
          },
          "regionIds": {
            "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            ]
          },
          "runNsfw": {
            "type": "boolean",
            "default": true,
            "description": "Run the NSFW screen. Defaults to true. A blocked image or video is not checked against your regions.",
            "examples": [
              true
            ]
          },
          "runRegional": {
            "type": "boolean",
            "default": true,
            "description": "Check against your regions. Defaults to true. At least one of `runNsfw` and `runRegional` must be true, except for audio and audio-only video. Image checks always run the region check when the NSFW screen lets the image through.",
            "examples": [
              true
            ]
          },
          "culturalProvider": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
            "examples": [
              "anthropic"
            ]
          },
          "context": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own metadata, stored with the decision. Keys starting with `_` are reserved and may be overwritten.",
            "examples": [
              {
                "campaign": "summer-sale-2026",
                "market": "ksa"
              }
            ]
          },
          "projectId": {
            "type": "string",
            "description": "Project to file this check under; omit for none. See List projects. It only organizes checks; it never changes who can see them.",
            "format": "uuid",
            "examples": [
              "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
            ]
          }
        },
        "required": [
          "imageUrl",
          "regionIds"
        ]
      },
      "ClassifyResultDto": {
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the decision this check produced. Use it with the Decisions and Review endpoints.",
            "examples": [
              "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
            ]
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Internal ID of the stored request behind the decision.",
            "examples": [
              "c4a7e9b2-5d1f-4e3a-8b6c-0d2e4f6a8b1c"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What was checked.",
            "examples": [
              "image"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REVIEW",
              "BLOCKED"
            ],
            "description": "Overall verdict. `BLOCKED` if the NSFW screen blocked the content; otherwise the worst region verdict. `APPROVED` when only the NSFW screen ran and passed, and `REVIEW` when nothing was scored.",
            "examples": [
              "REVIEW"
            ]
          },
          "overallScore": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overall score from 0 to 100, or null when nothing was scored.",
            "examples": [
              72.5
            ]
          },
          "nsfw": {
            "description": "NSFW screen result; null when it did not run (text and audio).",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/NsfwSummaryDto"
              }
            ]
          },
          "regions": {
            "description": "One entry per region you checked against.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegionScoringDto"
            }
          },
          "degraded": {
            "type": "boolean",
            "description": "True when part of the check could not run (for example a model was unavailable) and the verdict rests on less evidence.",
            "examples": [
              false
            ]
          },
          "degradedReasons": {
            "description": "Why the check is degraded. Empty when `degraded` is false.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              []
            ]
          },
          "credits": {
            "type": "number",
            "description": "Credits the check cost, after any adjustment.",
            "examples": [
              150
            ]
          },
          "storageKeyProcessed": {
            "type": [
              "string",
              "null"
            ],
            "description": "Not used for checks started through the API: always null.",
            "examples": [
              null
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the decision was recorded (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "decisionId",
          "requestId",
          "modality",
          "verdict",
          "overallScore",
          "nsfw",
          "regions",
          "degraded",
          "degradedReasons",
          "credits",
          "storageKeyProcessed",
          "createdAt"
        ]
      },
      "ClassifyTextDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The text to check, from 1 to 50,000 characters.",
            "examples": [
              "Celebrate the summer with our new range. Cheers with a cold one!"
            ]
          },
          "regionIds": {
            "description": "IDs of the regions to check against, from List regions: 1 to 50 UUIDs.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
              ]
            ]
          },
          "culturalProvider": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "description": "AI provider for the region check, for this check only. Defaults to `defaultCulturalProvider` in your settings.",
            "examples": [
              "anthropic"
            ]
          },
          "context": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own metadata, stored with the decision. Keys starting with `_` are reserved and may be overwritten.",
            "examples": [
              {
                "campaign": "summer-sale-2026",
                "market": "ksa"
              }
            ]
          },
          "projectId": {
            "type": "string",
            "description": "Project to file this check under; omit for none. See List projects. It only organizes checks; it never changes who can see them.",
            "format": "uuid",
            "examples": [
              "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
            ]
          }
        },
        "required": [
          "text",
          "regionIds"
        ]
      },
      "CountTextWordsDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The text to check, from 1 to 50,000 characters.",
            "examples": [
              "Celebrate the summer with our new range. Cheers with a cold one!"
            ]
          }
        },
        "required": [
          "text"
        ]
      },
      "CreateRegionDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the region, such as a country or market (up to 120 characters).",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "description": {
            "type": "string",
            "description": "What the region covers (up to 2,000 characters).",
            "examples": [
              "Campaigns shown in the Kingdom of Saudi Arabia."
            ]
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 95,
            "description": "Pass mark from 0 to 100. Content that scores below it is flagged. Defaults to 95.",
            "examples": [
              90
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateRuleDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Short label for the rule (up to 160 characters).",
            "examples": [
              "No alcohol shown"
            ]
          },
          "description": {
            "type": "string",
            "description": "What to check for, up to 4,000 characters. It is given to the model word for word, so make it specific.",
            "examples": [
              "The content must not show, mention or suggest alcoholic drinks, bars or drinking."
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "default": "med",
            "description": "How much the rule weighs in the region score: `low` (1), `med` (2) or `high` (4). Defaults to `med`.",
            "examples": [
              "high"
            ]
          },
          "contentTypes": {
            "type": "array",
            "description": "The kinds of content the rule is checked on. Defaults to `[\"image\"]`.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "text"
              ]
            },
            "examples": [
              [
                "image",
                "video"
              ]
            ]
          }
        },
        "required": [
          "title",
          "description"
        ]
      },
      "DecisionDetailDto": {
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the decision.",
            "examples": [
              "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
            ]
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Internal ID of the stored request behind the decision.",
            "examples": [
              "c4a7e9b2-5d1f-4e3a-8b6c-0d2e4f6a8b1c"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What was checked.",
            "examples": [
              "image"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REVIEW",
              "BLOCKED"
            ],
            "description": "The model's verdict.",
            "examples": [
              "REVIEW"
            ]
          },
          "overallScore": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overall score from 0 to 100, or null.",
            "examples": [
              72.5
            ]
          },
          "degraded": {
            "type": "boolean",
            "description": "True when part of the check could not run.",
            "examples": [
              false
            ]
          },
          "degradedReasons": {
            "description": "Why the check is degraded. Empty when `degraded` is false.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              []
            ]
          },
          "credits": {
            "type": "number",
            "description": "Credits the check cost, after refunds and adjustments.",
            "examples": [
              150
            ]
          },
          "creditsRefunded": {
            "type": "number",
            "description": "Credits given back because the check failed on our side.",
            "examples": [
              0
            ]
          },
          "creditsAdjusted": {
            "type": "number",
            "description": "Credits moved when the price was corrected after the check, in either direction.",
            "examples": [
              0
            ]
          },
          "nsfwResults": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Raw NSFW screen results. Usually empty: read `nsfw` instead.",
            "examples": [
              []
            ]
          },
          "nsfw": {
            "description": "NSFW screen result; null when it did not run.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/NsfwSummaryDto"
              }
            ]
          },
          "regions": {
            "description": "Full result per region, with every rule score.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegionScoringDto"
            }
          },
          "summary": {
            "type": "string",
            "description": "The model's summary of the check. Empty when there is none.",
            "examples": [
              "Mostly suitable; one alcohol reference needs a change."
            ]
          },
          "transcript": {
            "type": [
              "string",
              "null"
            ],
            "description": "Transcript of the speech for audio and video, or null.",
            "examples": [
              null
            ]
          },
          "contentUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The image URL you checked with Check an image from a URL, or null.",
            "examples": [
              "https://cdn.example.com/campaigns/summer-banner.png"
            ]
          },
          "sourceText": {
            "type": [
              "string",
              "null"
            ],
            "description": "The text you checked, for text decisions. Null otherwise.",
            "examples": [
              null
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "video",
              "audio",
              "both"
            ],
            "description": "For video, which parts were checked: `video`, `audio` or `both`. `both` for other content.",
            "examples": [
              "both"
            ]
          },
          "adjudication": {
            "description": "The reviewer's ruling, or null.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/AdjudicationDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the decision was recorded (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "decisionId",
          "requestId",
          "modality",
          "verdict",
          "overallScore",
          "degraded",
          "degradedReasons",
          "credits",
          "creditsRefunded",
          "creditsAdjusted",
          "nsfwResults",
          "nsfw",
          "regions",
          "summary",
          "transcript",
          "contentUrl",
          "sourceText",
          "scope",
          "adjudication",
          "createdAt"
        ]
      },
      "DecisionFrameDto": {
        "type": "object",
        "properties": {
          "tsSeconds": {
            "type": "number",
            "description": "Position of the frame in the video, in seconds.",
            "examples": [
              12.5
            ]
          },
          "url": {
            "type": "string",
            "description": "Signed URL of the frame image, valid for at least 5 minutes.",
            "examples": [
              "{{STORAGE_BASE_URL}}/quality-control/frames/3f9c2b1e-0012.jpg?X-Amz-Expires=300&X-Amz-Signature=abc123"
            ]
          }
        },
        "required": [
          "tsSeconds",
          "url"
        ]
      },
      "DecisionFramesResponseDto": {
        "type": "object",
        "properties": {
          "frames": {
            "description": "The frames sampled from the video, in order. Empty for other content.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionFrameDto"
            }
          }
        },
        "required": [
          "frames"
        ]
      },
      "DecisionImageUrlResponseDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed URL of the image, valid for at least 5 minutes. Null for decisions with no stored image (such as text).",
            "examples": [
              "{{STORAGE_BASE_URL}}/quality-control/inputs/3f9c2b1e.png?X-Amz-Expires=300&X-Amz-Signature=abc123"
            ]
          }
        },
        "required": [
          "url"
        ]
      },
      "DecisionListResponseDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Decisions matching the filters, across all pages.",
            "examples": [
              42
            ]
          },
          "items": {
            "description": "Decisions on this page, newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionSummaryDto"
            }
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "DecisionMediaUrlResponseDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed URL of the original audio or video, valid for at least 5 minutes. Null when nothing is stored.",
            "examples": [
              "{{STORAGE_BASE_URL}}/quality-control/inputs/3f9c2b1e.mp4?X-Amz-Expires=300&X-Amz-Signature=abc123"
            ]
          },
          "contentType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content type the URL serves the file with, from its extension. Null when unknown.",
            "examples": [
              "video/mp4"
            ]
          }
        },
        "required": [
          "url",
          "contentType"
        ]
      },
      "DecisionRegionSummaryDto": {
        "type": "object",
        "properties": {
          "region_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the region.",
            "examples": [
              "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
            ]
          },
          "region_name": {
            "type": "string",
            "description": "Name of the region.",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "score": {
            "type": "number",
            "description": "Region score from 0 to 100.",
            "examples": [
              72.5
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REVIEW",
              "BLOCKED"
            ],
            "description": "Verdict for this region.",
            "examples": [
              "REVIEW"
            ]
          }
        },
        "required": [
          "region_id",
          "region_name",
          "score",
          "verdict"
        ]
      },
      "DecisionSummaryDto": {
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the decision.",
            "examples": [
              "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What was checked.",
            "examples": [
              "image"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REVIEW",
              "BLOCKED"
            ],
            "description": "The model's verdict. A reviewer's ruling is in `adjudication` and does not change it.",
            "examples": [
              "REVIEW"
            ]
          },
          "overallScore": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overall score from 0 to 100, or null.",
            "examples": [
              72.5
            ]
          },
          "nsfw": {
            "description": "NSFW screen result; null when it did not run.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/NsfwSummaryDto"
              }
            ]
          },
          "regions": {
            "description": "Score and verdict per region.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionRegionSummaryDto"
            }
          },
          "adjudication": {
            "description": "The reviewer's ruling, or null if nobody has ruled on it.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/AdjudicationDto"
              }
            ]
          },
          "jobId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "ID of the check that produced the decision, or null for older decisions.",
            "examples": [
              "3f9c2b1e-7a4d-4c6b-9e2f-1a8b7c6d5e4f"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Project the check is in, or null.",
            "examples": [
              null
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the decision was recorded (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "decisionId",
          "modality",
          "verdict",
          "overallScore",
          "nsfw",
          "regions",
          "adjudication",
          "jobId",
          "projectId",
          "createdAt"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error body returned for every 4xx and 5xx response.",
        "required": [
          "statusCode",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code, repeated in the body.",
            "examples": [
              404
            ]
          },
          "message": {
            "description": "What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "examples": [
              "Booking not found"
            ]
          },
          "error": {
            "type": "string",
            "description": "Short name of the status.",
            "examples": [
              "Not Found"
            ]
          }
        }
      },
      "FixImageDto": {
        "type": "object",
        "properties": {
          "regionId": {
            "type": "string",
            "description": "ID of a region in the decision whose flagged rules and findings the fix should address.",
            "examples": [
              "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
            ]
          },
          "concernTitles": {
            "description": "Titles of the rules or findings to fix, from `per_rule` and `additional_findings` of that region. Leave it out to fix every flagged concern of the region.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "No alcohol shown"
              ]
            ]
          },
          "additionalInstructions": {
            "type": "string",
            "description": "Extra guidance for the edit (up to 2,000 characters).",
            "examples": [
              "Keep the brand colours and the logo unchanged."
            ]
          }
        },
        "required": [
          "regionId"
        ]
      },
      "ImageFixConcernDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the rule or finding.",
            "examples": [
              "No alcohol shown"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "Its severity.",
            "examples": [
              "high"
            ]
          }
        },
        "required": [
          "title",
          "severity"
        ]
      },
      "ImageFixJobResponseDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the image-fix job.",
            "examples": [
              "2a4c6e8f-1b3d-4f5a-8c7e-9d1f3a5c7e9b"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SCHEDULED",
              "RUNNING",
              "PAUSED",
              "COMPLETED",
              "COMPLETED_WITH_ERRORS",
              "FAILED",
              "TIMED_OUT",
              "TERMINATED"
            ],
            "description": "`queued`, `running`, `succeeded` or `failed`. The last two are final.",
            "examples": [
              "COMPLETED"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the fix failed. Null unless `status` is `failed`.",
            "examples": [
              null
            ]
          },
          "result": {
            "description": "The fixed image, once `status` is `succeeded`. Null before that.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageFixResultDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the fix was requested (ISO 8601).",
            "examples": [
              "2026-10-04T09:29:41.000Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the job last changed (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "jobId",
          "status",
          "error",
          "result",
          "createdAt",
          "updatedAt"
        ]
      },
      "ImageFixListResponseDto": {
        "type": "object",
        "properties": {
          "fixes": {
            "description": "Up to 20 fixes of the decision, newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageFixSummaryDto"
            }
          }
        },
        "required": [
          "fixes"
        ]
      },
      "ImageFixResultDto": {
        "type": "object",
        "properties": {
          "imageFixId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the fix. It also appears in List image fixes.",
            "examples": [
              "6f8a1c3e-5b7d-4e9a-8c2f-4d6b8a0c2e4f"
            ]
          },
          "storageKey": {
            "type": "string",
            "description": "Storage key of the fixed image in your organization storage.",
            "examples": [
              "quality-control/fixes/6f8a1c3e.png"
            ]
          },
          "signedUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed URL of the fixed image, valid for at least 5 minutes. Null if it could not be signed.",
            "examples": [
              "{{STORAGE_BASE_URL}}/quality-control/fixes/6f8a1c3e.png?X-Amz-Expires=300&X-Amz-Signature=abc123"
            ]
          },
          "base64": {
            "type": "string",
            "description": "The fixed image, base64-encoded. Empty if it could not be read.",
            "examples": [
              "iVBORw0KGgoAAAANSUhEUgAA..."
            ]
          },
          "contentType": {
            "type": "string",
            "description": "Content type of the fixed image.",
            "examples": [
              "image/png"
            ]
          },
          "prompt": {
            "type": "string",
            "description": "The prompt the image was edited with.",
            "examples": [
              "Replace the beer glass in the foreground with a glass of orange juice."
            ]
          },
          "editInstructions": {
            "type": [
              "string",
              "null"
            ],
            "description": "The numbered list of edits that were planned, or null.",
            "examples": [
              "1. Replace the beer glass with a glass of orange juice."
            ]
          },
          "concerns": {
            "description": "The concerns the fix addressed.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageFixConcernDto"
            }
          },
          "credits": {
            "type": "number",
            "description": "Credits the fix cost.",
            "examples": [
              300
            ]
          }
        },
        "required": [
          "imageFixId",
          "storageKey",
          "signedUrl",
          "base64",
          "contentType",
          "prompt",
          "editInstructions",
          "concerns",
          "credits"
        ]
      },
      "ImageFixSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the fix.",
            "examples": [
              "6f8a1c3e-5b7d-4e9a-8c2f-4d6b8a0c2e4f"
            ]
          },
          "regionName": {
            "type": "string",
            "description": "Region whose concerns were fixed.",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "concerns": {
            "description": "The concerns the fix addressed.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageFixConcernDto"
            }
          },
          "base64": {
            "type": [
              "string",
              "null"
            ],
            "description": "The fixed image, base64-encoded. Null if it could not be read.",
            "examples": [
              "iVBORw0KGgoAAAANSUhEUgAA..."
            ]
          },
          "contentType": {
            "type": "string",
            "description": "Content type of the fixed image.",
            "examples": [
              "image/png"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the fix was made (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "id",
          "regionName",
          "concerns",
          "base64",
          "contentType",
          "createdAt"
        ]
      },
      "InsufficientCreditsErrorDto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code.",
            "examples": [
              402
            ]
          },
          "error": {
            "type": "string",
            "description": "Always `InsufficientCredits`.",
            "examples": [
              "InsufficientCredits"
            ]
          },
          "message": {
            "type": "string",
            "description": "What happened, in plain words.",
            "examples": [
              "You don't have enough credits to start this. It needs 120; you have 45."
            ]
          },
          "required": {
            "type": "number",
            "description": "Credits this request needs.",
            "examples": [
              120
            ]
          },
          "available": {
            "type": "number",
            "description": "Credits your organization can spend now.",
            "examples": [
              45
            ]
          },
          "owed": {
            "type": "number",
            "description": "Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.",
            "examples": [
              0
            ]
          }
        },
        "required": [
          "statusCode",
          "error",
          "message",
          "required",
          "available",
          "owed"
        ]
      },
      "MoveCheckToProjectBodyDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Project to move the check into. Pass `null` to unassign it.",
            "examples": [
              "7b9d2f4a-6c8e-4a1b-9d3f-5e7a9c1b3d5f"
            ]
          }
        },
        "required": [
          "projectId"
        ]
      },
      "MoveCheckToProjectResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Where the check is now.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MovedProjectDto"
              }
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "MovedProjectDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The project the run is in now. Null when it is in none.",
            "examples": [
              "6d5c4b3a-2e1f-4a0b-9c8d-7e6f5a4b3c2d"
            ]
          }
        },
        "required": [
          "projectId"
        ]
      },
      "NsfwSummaryDto": {
        "type": "object",
        "properties": {
          "ran": {
            "type": "boolean",
            "description": "Whether the NSFW screen ran.",
            "examples": [
              true
            ]
          },
          "blocked": {
            "type": "boolean",
            "description": "Whether the content scored at or above `threshold` and was blocked. A blocked image is not checked against your regions.",
            "examples": [
              false
            ]
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "description": "NSFW score from 0 to 100; higher is more explicit.",
            "examples": [
              3.2
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model provider that ran the screen.",
            "examples": [
              "marqo"
            ]
          },
          "threshold": {
            "type": "number",
            "description": "Score at or above which content is blocked: `nsfwBlockThreshold` from your settings.",
            "examples": [
              95
            ]
          }
        },
        "required": [
          "ran",
          "blocked",
          "score",
          "provider",
          "threshold"
        ]
      },
      "PerRuleResultDto": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the rule.",
            "examples": [
              "9e1a3c5b-7d2f-4b4a-9c6e-8f0a2b4d6c8e"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title of the rule.",
            "examples": [
              "No alcohol shown"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "Severity of the rule: `low`, `med` or `high`.",
            "examples": [
              "high"
            ]
          },
          "score": {
            "type": "number",
            "description": "How well the content meets the rule, from 0 to 100. 100 means fully compliant.",
            "examples": [
              20
            ]
          },
          "rationale": {
            "type": "string",
            "description": "Why the model gave this score.",
            "examples": [
              "A glass of beer is visible in the foreground."
            ]
          }
        },
        "required": [
          "rule_id",
          "title",
          "severity",
          "score",
          "rationale"
        ]
      },
      "QcSettingsResponseDto": {
        "type": "object",
        "properties": {
          "defaultCulturalProvider": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "description": "AI provider that scores content against your regions, unless a check sets `culturalProvider`.",
            "examples": [
              "openai"
            ]
          },
          "nsfwBlockThreshold": {
            "type": "number",
            "description": "NSFW score from 0 to 100 at or above which images and video are blocked.",
            "examples": [
              95
            ]
          },
          "rateLimitImage": {
            "type": "number",
            "description": "Image checks your organization can start per minute. 0 means no limit.",
            "examples": [
              5
            ]
          },
          "rateLimitVideo": {
            "type": "number",
            "description": "Video checks per minute. 0 means no limit.",
            "examples": [
              1
            ]
          },
          "rateLimitText": {
            "type": "number",
            "description": "Text checks per minute. 0 means no limit.",
            "examples": [
              25
            ]
          },
          "rateLimitAudio": {
            "type": "number",
            "description": "Audio checks per minute. 0 means no limit.",
            "examples": [
              5
            ]
          }
        },
        "required": [
          "defaultCulturalProvider",
          "nsfwBlockThreshold",
          "rateLimitImage",
          "rateLimitVideo",
          "rateLimitText",
          "rateLimitAudio"
        ]
      },
      "QcUploadPresignDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "Name of the file you will upload. Its extension must be one this step takes.",
            "examples": [
              "catalogue.csv"
            ]
          },
          "contentType": {
            "type": "string",
            "description": "The file's type, sent again as the `Content-Type` of the `PUT` (the URL is signed over it). `application/octet-stream` is accepted when the type is unknown.",
            "examples": [
              "text/csv"
            ]
          },
          "size": {
            "type": "number",
            "description": "Exact size of the file in bytes. It is part of the signed URL: storage refuses a `PUT` of any other length.",
            "examples": [
              524288
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "audio",
              "video"
            ],
            "description": "Which check the file is for: `image` for Check an uploaded image (up to 8 MB), `audio` for Check audio (up to 128 MB), `video` for Check video (up to 512 MB). The key works only for that check.",
            "examples": [
              "video"
            ]
          }
        },
        "required": [
          "fileName",
          "contentType",
          "size",
          "kind"
        ]
      },
      "RegionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the region. Pass it in `regionIds` when you start a check.",
            "examples": [
              "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the region.",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the region covers, or null.",
            "examples": [
              "Campaigns shown in the Kingdom of Saudi Arabia."
            ]
          },
          "threshold": {
            "type": "number",
            "description": "Pass mark from 0 to 100. Content that scores below it is flagged.",
            "examples": [
              95
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "threshold"
        ]
      },
      "RegionScoringDto": {
        "type": "object",
        "properties": {
          "region_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the region.",
            "examples": [
              "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
            ]
          },
          "region_name": {
            "type": "string",
            "description": "Name of the region.",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "region_score": {
            "type": "number",
            "description": "Region score from 0 to 100, weighted by rule severity.",
            "examples": [
              72.5
            ]
          },
          "threshold": {
            "type": "number",
            "description": "The region's pass mark (`threshold`) when the check ran.",
            "examples": [
              95
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REVIEW",
              "BLOCKED"
            ],
            "description": "Verdict for this region: `APPROVED`, `REVIEW` or `BLOCKED`.",
            "examples": [
              "REVIEW"
            ]
          },
          "summary": {
            "type": "string",
            "description": "The model's summary of the check.",
            "examples": [
              "Mostly suitable; one alcohol reference needs a change."
            ]
          },
          "per_rule": {
            "description": "Score of each of the region's rules that applies to this content type.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerRuleResultDto"
            }
          },
          "additional_findings": {
            "description": "Problems the model found that no rule covers.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalFindingDto"
            }
          }
        },
        "required": [
          "region_id",
          "region_name",
          "region_score",
          "threshold",
          "verdict",
          "summary",
          "per_rule",
          "additional_findings"
        ]
      },
      "RegionWithRuleCountDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the region. Pass it in `regionIds` when you start a check.",
            "examples": [
              "5b8d1f3a-2c4e-4a6b-8d0f-3e5a7c9b1d2f"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the region.",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the region covers, or null.",
            "examples": [
              "Campaigns shown in the Kingdom of Saudi Arabia."
            ]
          },
          "threshold": {
            "type": "number",
            "description": "Pass mark from 0 to 100. Content that scores below it is flagged.",
            "examples": [
              95
            ]
          },
          "rulesCount": {
            "type": "number",
            "description": "Number of rules in the region.",
            "examples": [
              12
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "threshold",
          "rulesCount"
        ]
      },
      "ReviewQueueItemDto": {
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the decision. Rule on it with Rule on a decision.",
            "examples": [
              "8d2e4f6a-1b3c-4d5e-9f7a-2b4c6d8e0f1a"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What was checked.",
            "examples": [
              "image"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "REVIEW",
              "BLOCKED"
            ],
            "description": "The model's verdict: `REVIEW` or `BLOCKED`.",
            "examples": [
              "REVIEW"
            ]
          },
          "overallScore": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overall score from 0 to 100, or null.",
            "examples": [
              72.5
            ]
          },
          "nsfw": {
            "description": "NSFW screen result; null when it did not run.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/NsfwSummaryDto"
              }
            ]
          },
          "regions": {
            "description": "Score and verdict per region.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionRegionSummaryDto"
            }
          },
          "createdAt": {
            "type": "string",
            "description": "When the decision was recorded (ISO 8601).",
            "examples": [
              "2026-10-04T09:30:00.000Z"
            ]
          },
          "adjudication": {
            "description": "The ruling so far. Always null unless you pass `includeAdjudicated=true`.",
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/AdjudicationDto"
              }
            ]
          }
        },
        "required": [
          "decisionId",
          "modality",
          "verdict",
          "overallScore",
          "nsfw",
          "regions",
          "createdAt",
          "adjudication"
        ]
      },
      "ReviewQueueResponseDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Flagged decisions matching the filters, across all pages.",
            "examples": [
              7
            ]
          },
          "items": {
            "description": "Decisions on this page, newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewQueueItemDto"
            }
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "RuleCandidateDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Short label for the rule.",
            "examples": [
              "No pork products"
            ]
          },
          "description": {
            "type": "string",
            "description": "What to check for.",
            "examples": [
              "The content must not show or mention pork or pork-based products."
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "Proposed severity.",
            "examples": [
              "high"
            ]
          },
          "contentTypes": {
            "type": "array",
            "description": "The kinds of content the rule would apply to.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "text"
              ]
            },
            "examples": [
              [
                "image",
                "text"
              ]
            ]
          }
        },
        "required": [
          "title",
          "description",
          "severity",
          "contentTypes"
        ]
      },
      "RuleCandidatesResponseDto": {
        "type": "object",
        "properties": {
          "candidates": {
            "description": "Proposed rules, without duplicates of the existing ones. Nothing is saved: add the ones you want with Add a rule.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleCandidateDto"
            }
          }
        },
        "required": [
          "candidates"
        ]
      },
      "RuleDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the rule.",
            "examples": [
              "9e1a3c5b-7d2f-4b4a-9c6e-8f0a2b4d6c8e"
            ]
          },
          "title": {
            "type": "string",
            "description": "Short label for the rule.",
            "examples": [
              "No alcohol shown"
            ]
          },
          "description": {
            "type": "string",
            "description": "What to check for. It is given to the model word for word, so make it specific.",
            "examples": [
              "The content must not show, mention or suggest alcoholic drinks, bars or drinking."
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "How much the rule weighs in the region score: `low` (1), `med` (2) or `high` (4).",
            "examples": [
              "high"
            ]
          },
          "contentTypes": {
            "type": "array",
            "description": "The kinds of content the rule is checked on.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "text"
              ]
            },
            "examples": [
              [
                "image",
                "video"
              ]
            ]
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "severity",
          "contentTypes"
        ]
      },
      "StagedUploadTicketDto": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string",
            "description": "Presigned URL. `PUT` the file bytes to it within `expiresInSeconds`, with exactly the headers in `headers`, without your API key."
          },
          "uploadKey": {
            "type": "string",
            "description": "The upload key. Send it as `uploadKey` to the step the file is for once the `PUT` has finished. It can be used once, and an upload not used within a day is deleted.",
            "examples": [
              "1f0c…/staged-uploads/7b9e….csv"
            ]
          },
          "headers": {
            "type": "object",
            "description": "Headers the `PUT` must send exactly (the URL is signed over them).",
            "examples": [
              {
                "Content-Type": "text/csv",
                "Content-Disposition": "attachment"
              }
            ]
          },
          "expiresInSeconds": {
            "type": "number",
            "description": "Seconds the URL stays valid for starting the `PUT`.",
            "examples": [
              600
            ]
          },
          "maxBytes": {
            "type": "number",
            "description": "The largest file this step takes, in bytes.",
            "examples": [
              26214400
            ]
          }
        },
        "required": [
          "uploadUrl",
          "uploadKey",
          "headers",
          "expiresInSeconds",
          "maxBytes"
        ]
      },
      "StartCheckResponseDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the new check. Poll it with Get a check.",
            "examples": [
              "3f9c2b1e-7a4d-4c6b-9e2f-1a8b7c6d5e4f"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED"
            ],
            "description": "Always `queued`: the check is waiting to start.",
            "examples": [
              "SCHEDULED"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "text"
            ],
            "description": "What is being checked: `image`, `text`, `audio` or `video`.",
            "examples": [
              "image"
            ]
          }
        },
        "required": [
          "jobId",
          "status",
          "modality"
        ]
      },
      "StartImageFixResponseDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the image-fix job. Poll it with Get an image fix.",
            "examples": [
              "2a4c6e8f-1b3d-4f5a-8c7e-9d1f3a5c7e9b"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED"
            ],
            "description": "Always `queued`.",
            "examples": [
              "SCHEDULED"
            ]
          }
        },
        "required": [
          "jobId",
          "status"
        ]
      },
      "TextWordCountResponseDto": {
        "type": "object",
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "classify_text"
            ],
            "description": "The rate a text check is charged under (the part of the rate key after `quality_control.classification.`).",
            "examples": [
              "classify_text"
            ]
          },
          "words": {
            "type": "number",
            "description": "The billable words of `text`: the count Check text charges it on. Text with no word at all (only emoji or punctuation) counts as 1.",
            "examples": [
              12
            ]
          }
        },
        "required": [
          "operation",
          "words"
        ]
      },
      "UpdateRegionDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "New name (up to 120 characters).",
            "examples": [
              "Saudi Arabia"
            ]
          },
          "description": {
            "type": "string",
            "description": "New description (up to 2,000 characters).",
            "examples": [
              "Campaigns shown in the Kingdom of Saudi Arabia."
            ]
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "New pass mark from 0 to 100. Applies to checks started from now on.",
            "examples": [
              90
            ]
          }
        }
      },
      "UpdateRuleDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "New label (up to 160 characters).",
            "examples": [
              "No alcohol shown"
            ]
          },
          "description": {
            "type": "string",
            "description": "New description (up to 4,000 characters).",
            "examples": [
              "The content must not show, mention or suggest alcoholic drinks or bars."
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "med",
              "high"
            ],
            "description": "New severity: `low`, `med` or `high`.",
            "examples": [
              "med"
            ]
          },
          "contentTypes": {
            "type": "array",
            "description": "New list of content kinds. Replaces the old list.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "text"
              ]
            },
            "examples": [
              [
                "image"
              ]
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
