{
  "openapi": "3.1.0",
  "info": {
    "title": "TruthScan AI Image Detection API",
    "version": "0.1.0",
    "description": "Public endpoints of TruthScan AI Image Detection API. Full guide: https://truthscan.com/truthscan-ai-image-detection-api-documentation. Get an API key at https://truthscan.com/account."
  },
  "externalDocs": {
    "url": "https://truthscan.com/truthscan-ai-image-detection-api-documentation"
  },
  "servers": [
    {
      "url": "https://detect-image.truthscan.com"
    }
  ],
  "paths": {
    "/get-presigned-url": {
      "get": {
        "summary": "Get Presigned Upload Url",
        "operationId": "get_presigned_upload_url_get_presigned_url_get",
        "parameters": [
          {
            "name": "file_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Original file name",
              "title": "File Name"
            },
            "description": "Original file name"
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Expiration time in seconds",
              "default": 3600,
              "title": "Expiration"
            },
            "description": "Expiration time in seconds"
          },
          {
            "name": "proxy_host",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional allow-listed host to return the presigned upload URL on. Ignored if not allow-listed.",
              "title": "Proxy Host"
            },
            "description": "Optional allow-listed host to return the presigned upload URL on. Ignored if not allow-listed."
          },
          {
            "name": "apikey",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Apikey"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Presigned upload URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresignedUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/detect": {
      "post": {
        "summary": "Detect",
        "description": "Submit an image for AI detection. Set generate_preview=false, generate_analysis_details=false, and generate_heatmap=false for fastest results. See GET /help.",
        "operationId": "detect_detect_post",
        "parameters": [
          {
            "name": "userkey",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Userkey"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job accepted. Poll /query with the returned id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedJobResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/bulk-upload": {
      "post": {
        "summary": "Detect Bulk",
        "description": "Submit a ZIP file for bulk AI detection. Defaults favor speed. Set generate_preview=false, generate_analysis_details=false, and generate_heatmap=false for fastest results. See GET /help.",
        "operationId": "detect_bulk_bulk_upload_post",
        "parameters": [
          {
            "name": "userkey",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Userkey"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job accepted. Poll /query with the returned id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkAcceptedJobResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/query": {
      "post": {
        "summary": "Query",
        "description": "Query document status and results. Accepts document id from /detect or /detect-bulk. Returns single-image or bulk format based on document type.",
        "operationId": "query_query_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/QueryResponse"
                    },
                    {
                      "$ref": "#/components/schemas/BulkUploadQueryResponse"
                    }
                  ],
                  "title": "Response Query Query Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/heatmap/{id}": {
      "post": {
        "summary": "Get Heatmap Asset",
        "operationId": "get_heatmap_asset_heatmap__id__post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HeatmapPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Heatmap bytes when one is available (X-Heatmap-Status may be set). JSON when there is no heatmap to serve.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          },
          "202": {
            "description": "Heatmap still pending; poll /query and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not own this document. Do not retry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Document id not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "A heatmap is stored but could not be downloaded from storage. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/preview/{id}": {
      "post": {
        "summary": "Get Preview Asset",
        "operationId": "get_preview_asset_preview__id__post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HeatmapPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preview image bytes.",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "No preview was generated (generate_preview was false) or unknown id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "detail": {}
                  },
                  "title": "ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/check-user-credits": {
      "get": {
        "summary": "Check User Credits",
        "description": "This endpoint accepts the users apikey via the header. And returns users credit details.",
        "operationId": "check_user_credits_check_user_credits_get",
        "parameters": [
          {
            "name": "apikey",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Apikey"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserCreditsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BulkUploadItemResult": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "result": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "result_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResultDetails"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "BulkUploadItemResult"
      },
      "BulkUploadQueryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/BulkUploadItemResult"
            },
            "type": "array",
            "title": "Results",
            "default": []
          },
          "skipped": {
            "items": {
              "$ref": "#/components/schemas/BulkUploadItemResult"
            },
            "type": "array",
            "title": "Skipped",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "results"
        ],
        "title": "BulkUploadQueryResponse"
      },
      "BulkUploadRequest": {
        "properties": {
          "generate_heatmap": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap",
            "default": true
          },
          "generate_heatmap_overlayed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap Overlayed",
            "default": true
          },
          "generate_heatmap_normalized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap Normalized",
            "default": true
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url"
          },
          "expected_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Count"
          },
          "generate_preview": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Preview",
            "description": "Generate preview URLs per image. Set false for fastest results.",
            "default": false
          },
          "generate_analysis_details": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Analysis Details",
            "description": "Generate detailed analysis per image. Set false for fastest results."
          },
          "include_content_moderation": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Content Moderation",
            "default": false
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model routing hint: generic, or instance_id/model.",
            "default": "generic"
          }
        },
        "type": "object",
        "required": [
          "key",
          "url"
        ],
        "title": "BulkUploadRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HeatmapPreviewRequest": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          }
        },
        "type": "object",
        "required": [
          "key"
        ],
        "title": "HeatmapPreviewRequest"
      },
      "QueryDocumentRequest": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "QueryDocumentRequest"
      },
      "QueryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "result": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "result_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResultDetails"
              },
              {
                "type": "null"
              }
            ]
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "QueryResponse",
        "examples": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "preview_url": "https://...image.jpg",
            "result": 99,
            "result_details": {
              "confidence": 99,
              "detection_step": 3,
              "final_label_confidence": 95,
              "final_result": "AI Generated",
              "is_valid": true,
              "metadata": [
                "Not AI Generated",
                "No AI indicators found"
              ],
              "ml_model": [
                "AI Generated",
                95
              ],
              "ocr": [
                "Grok",
                95
              ],
              "synthid": [
                "No SynthID detected",
                0
              ],
              "warnings": [
                {
                  "confidence": 0.95,
                  "label": "Grok",
                  "type": "watermark"
                },
                {
                  "label": "Blurred",
                  "type": "blur_dark"
                }
              ]
            },
            "status": "done"
          }
        ],
        "not": {
          "required": [
            "results"
          ]
        }
      },
      "ResultDetails": {
        "properties": {
          "is_valid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Valid",
            "default": true
          },
          "detection_step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detection Step",
            "description": "Highest legacy stage ID reached (initialized to 1): 1=metadata, 2=watermark/OCR or SynthID, 3=ML. IDs are retained for backward compatibility, not chronological execution order. Remains 3 when provenance checks run after ML; does not indicate whether they ran or were positive."
          },
          "final_result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Result"
          },
          "metadata": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "string"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "metadata_basic_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata Basic Source"
          },
          "ocr": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Ocr"
          },
          "synthid": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Synthid"
          },
          "ml_model": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Ml Model"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "final_label_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Final Label Confidence"
          },
          "analysis_results": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Results"
          },
          "analysis_results_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Results Status"
          },
          "content_moderation": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Moderation"
          },
          "content_moderation_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Moderation Status"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "heatmap_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heatmap Url"
          },
          "heatmap_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heatmap Status"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "ResultDetails"
      },
      "SubmitRequest": {
        "properties": {
          "generate_heatmap": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap",
            "default": true
          },
          "generate_heatmap_overlayed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap Overlayed",
            "default": true
          },
          "generate_heatmap_normalized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Heatmap Normalized",
            "default": true
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "Send `https://ai-image-detector-prod.nyc3.digitaloceanspaces.com/<file_path>` as `url` to /detect or /bulk-upload."
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "document_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubmittableDocumentType"
              },
              {
                "type": "null"
              }
            ],
            "default": "Image"
          },
          "generate_preview": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Preview",
            "description": "Generate a preview URL. Set false for fastest results.",
            "default": true
          },
          "generate_analysis_details": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generate Analysis Details",
            "description": "Generate detailed analysis. Set false for fastest results. Defaults to true."
          },
          "include_content_moderation": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Content Moderation",
            "default": false
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model routing hint: generic, or instance_id/model.",
            "default": "generic"
          }
        },
        "type": "object",
        "required": [
          "key"
        ],
        "title": "SubmitRequest"
      },
      "SubmittableDocumentType": {
        "type": "string",
        "enum": [
          "Image",
          "SampleImage",
          "image-zip"
        ],
        "title": "SubmittableDocumentType",
        "description": "Subset of DocumentType accepted by the image-detection API endpoints."
      },
      "UserCreditsResponse": {
        "properties": {
          "baseCredits": {
            "type": "integer",
            "title": "Basecredits"
          },
          "boostCredits": {
            "type": "integer",
            "title": "Boostcredits"
          },
          "credits": {
            "type": "integer",
            "title": "Credits"
          }
        },
        "type": "object",
        "required": [
          "baseCredits",
          "boostCredits",
          "credits"
        ],
        "title": "UserCreditsResponse",
        "examples": [
          {
            "baseCredits": 100,
            "boostCredits": 50,
            "credits": 150
          }
        ]
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "PresignedUploadResponse": {
        "type": "object",
        "title": "PresignedUploadResponse",
        "required": [
          "status",
          "presigned_url",
          "file_path",
          "document_id"
        ],
        "properties": {
          "status": {
            "type": "string",
            "examples": [
              "success"
            ]
          },
          "presigned_url": {
            "type": "string",
            "description": "URL to PUT the file bytes to. A successful PUT returns HTTP 200 with an empty body."
          },
          "file_path": {
            "type": "string",
            "description": "Storage path of the uploaded file. Send `https://ai-image-detector-prod.nyc3.digitaloceanspaces.com/<file_path>` as `url` to /detect or /bulk-upload."
          },
          "document_id": {
            "type": "string",
            "description": "New UUID for this upload request, for correlation only. It is not the job id; /detect and /bulk-upload return the id to poll."
          }
        }
      },
      "AcceptedJobResponse": {
        "type": "object",
        "title": "AcceptedJobResponse",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Job id to pass to /query."
          },
          "status": {
            "type": "string",
            "examples": [
              "pending"
            ]
          }
        }
      },
      "BulkAcceptedJobResponse": {
        "type": "object",
        "title": "BulkAcceptedJobResponse",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Job id to pass to /query."
          },
          "status": {
            "type": "string",
            "examples": [
              "pending"
            ]
          },
          "expected_count": {
            "type": "integer",
            "description": "How many images from the ZIP will be analyzed."
          }
        }
      }
    }
  }
}
