{
  "openapi": "3.1.0",
  "info": {
    "title": "Veridexa Fraud Detection API",
    "description": "Submit exactly one ChatGPT-uploaded document for AI fraud detection and return the completed Veridexa fraud detection report for that document only.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://veridexa.io"
    }
  ],
  "paths": {
    "/api/public/gpt-action/verify": {
      "post": {
        "operationId": "verifyDocument",
        "summary": "Run AI fraud detection on one ChatGPT-uploaded document and return the completed Veridexa report.",
        "description": "Securely process exactly one ChatGPT-uploaded PDF, PNG, JPEG, or WEBP document through Veridexa fraud detection. Return only the completed report for that document. Maximum file size: 20 MB. Submitted documents are securely processed and retained according to https://veridexa.io/privacy.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or unsupported input."
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "413": {
            "description": "Uploaded document exceeds the 20 MB size limit."
          },
          "415": {
            "description": "Unsupported file mime type."
          },
          "429": {
            "description": "Rate limit exceeded for this caller."
          },
          "500": {
            "description": "Verification failed."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "VerifyRequest": {
        "type": "object",
        "required": [
          "openaiFileIdRefs"
        ],
        "properties": {
          "openaiFileIdRefs": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "description": "Exactly one ChatGPT-uploaded file reference. ChatGPT populates this special parameter automatically from the user's attachment.",
            "items": {
              "type": "object",
              "required": [
                "name",
                "id",
                "mime_type",
                "download_link"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "mime_type": {
                  "type": "string"
                },
                "download_link": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "VerifyResponse": {
        "type": "object",
        "required": [
          "userReport"
        ],
        "properties": {
          "userReport": {
            "type": "string",
            "description": "Presentation-ready Markdown fraud detection report. Display verbatim; never expose raw JSON."
          }
        }
      }
    }
  }
}