{
  "openapi": "3.1.0",
  "info": {
    "title": "CVBase.ai ATS Scoring and AI Draft Hand-off API",
    "version": "1.1.0",
    "description": "Free public endpoints from CVBase.ai (cvbase.ai) for ChatGPT Actions and other AI assistants: score a resume against CVBase's 5 weighted ATS checks, and turn an AI-written draft into a one-click link that opens it in the CVBase.ai importer. No API key. Resume text sent to /score-ats is scored and not stored. A draft sent to /create-draft is stored for 24 hours so the link works, then deleted. Privacy policy: https://cvbase.ai/legal/privacy",
    "termsOfService": "https://cvbase.ai/legal/terms",
    "contact": {
      "name": "CVBase.ai support",
      "email": "support@cvbase.ai",
      "url": "https://cvbase.ai/contact"
    }
  },
  "servers": [
    {
      "url": "https://auth.cvbase.ai/functions/v1/ai-import",
      "description": "CVBase.ai AI import gateway"
    }
  ],
  "security": [],
  "paths": {
    "/score-ats": {
      "post": {
        "operationId": "scoreAtsResume",
        "summary": "Score a resume against 5 weighted ATS checks and an optional job description",
        "description": "Read-only: nothing is stored. matchScore, matchedKeywords and missingKeywords are filled only when a job description long enough to extract skills from is sent (a full posting, not one line).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "resumeText"
                ],
                "properties": {
                  "resumeText": {
                    "type": "string",
                    "minLength": 30,
                    "maxLength": 60000,
                    "description": "Plain text or Markdown resume content."
                  },
                  "jobDescription": {
                    "type": "string",
                    "maxLength": 30000,
                    "description": "Optional full text of the target job posting."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Weighted ATS score, keyword match and prioritized fixes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AtsScore"
                }
              }
            }
          },
          "400": {
            "description": "resumeText missing, shorter than 30 or longer than 60,000 characters (error: invalid_resume_text).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/create-draft": {
      "post": {
        "operationId": "createCvDraftLink",
        "summary": "Create a one-click CVBase.ai import link from an AI-written Markdown or JSON Resume draft",
        "description": "Stores the draft for 24 hours and returns a link that opens it in https://cvbase.ai/import-from-ai. Send markdown or json. Limited to 20 drafts per hour per IP address.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "markdown": {
                    "type": "string",
                    "description": "Markdown resume draft."
                  },
                  "json": {
                    "type": "object",
                    "description": "JSON Resume or CVBase ResumeData object."
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Assistant name, e.g. chatgpt, claude or gemini."
                  }
                },
                "description": "The whole request body must be under 60,000 characters."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import link valid for 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftLink"
                }
              }
            }
          },
          "400": {
            "description": "No markdown or json given (empty_draft) or the body is not JSON (invalid_json).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body longer than 60,000 characters (draft_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 20 drafts from this IP address in the last hour (too_many_requests).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AtsScore": {
        "type": "object",
        "required": [
          "overallScore",
          "dimensions",
          "matchScore",
          "matchedKeywords",
          "missingKeywords",
          "prioritizedFixes",
          "checkUrl"
        ],
        "properties": {
          "overallScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "parseability",
                    "contact",
                    "structure",
                    "writing",
                    "density"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "score": {
                  "type": "integer"
                },
                "summary": {
                  "type": "string"
                }
              }
            }
          },
          "matchScore": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Job match percentage, or null without a usable job description."
          },
          "matchedKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prioritizedFixes": {
            "type": "array",
            "maxItems": 6,
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "critical",
                    "high",
                    "medium",
                    "low"
                  ]
                },
                "impact": {
                  "type": "number"
                },
                "detail": {
                  "type": "string"
                }
              }
            }
          },
          "checkUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "DraftLink": {
        "type": "object",
        "required": [
          "id",
          "format",
          "importUrl",
          "expiresAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "markdown",
              "json_resume",
              "cvbase"
            ]
          },
          "importUrl": {
            "type": "string",
            "format": "uri",
            "description": "Open this link to load the draft into the CVBase.ai importer."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
