{
  "openapi": "3.0.3",
  "info": {
    "title": "WGAI Labs Hiring Screening API",
    "version": "1.0.0",
    "description": "API for AI Engineering position applications"
  },
  "servers": [
    {
      "url": "https://eval.lab.whitegloveai.com"
    }
  ],
  "paths": {
    "/v1/api/hire/me": {
      "post": {
        "summary": "Submit job application",
        "security": [
          {
            "AuthKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "github_url",
                  "background",
                  "full_name",
                  "email",
                  "years_experience",
                  "skills",
                  "position_applied"
                ],
                "properties": {
                  "github_url": {
                    "type": "string",
                    "pattern": "^https://github\\.com/[a-zA-Z0-9]([a-zA-Z0-9-_]*[a-zA-Z0-9])?$"
                  },
                  "background": {
                    "type": "string",
                    "minLength": 50
                  },
                  "full_name": {
                    "type": "string",
                    "minLength": 2
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "years_experience": {
                    "type": "number",
                    "minimum": 0
                  },
                  "skills": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1
                  },
                  "position_applied": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application submitted successfully with Phase 2 instructions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "submitted_at": {
                      "type": "string"
                    },
                    "next_step": {
                      "type": "object",
                      "properties": {
                        "instruction": {
                          "type": "string"
                        },
                        "pdf_url": {
                          "type": "string"
                        },
                        "requirements": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "deadline": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed"
          },
          "401": {
            "description": "Invalid authentication"
          }
        }
      }
    },
    "/v2/api/analyze/technical-document": {
      "post": {
        "summary": "Submit technical document analysis (Phase 2)",
        "security": [
          {
            "AuthKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "synopsis",
                  "key_concepts",
                  "technical_details",
                  "analysis",
                  "submitted_by"
                ],
                "properties": {
                  "synopsis": {
                    "type": "string",
                    "minLength": 100
                  },
                  "key_concepts": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 3
                  },
                  "technical_details": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 3
                  },
                  "analysis": {
                    "type": "string",
                    "minLength": 200
                  },
                  "submitted_by": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Technical analysis completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "submitted_at": {
                      "type": "string"
                    },
                    "final_message": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "next_steps": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "PDF analysis validation failed"
          },
          "401": {
            "description": "Invalid authentication key for Phase 2"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AuthKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Auth-Key"
      }
    }
  }
}