> ## Documentation Index
> Fetch the complete documentation index at: https://partner-docs.fastgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Candidate Scoring

> Upload your CV, resume or HR-related documents in PDF format to extract information and receive an AI-based score according to your selected scoring template.

### File Options

#### 1. Direct File Upload

* Submit the PDF file directly using multipart/form-data
* Maximum file size: 30MB
* Ideal for local files that need to be uploaded from a client application

#### 2. URL Submission

* Provide a publicly accessible URL where the PDF file is hosted
* Maximum file size: 30MB
* Useful for files that are already hosted online or stored in cloud storage
* The API will download and process the file from the provided URL

<Info>
  Both methods expect PDF format files only and will return the same structured CV evaluation response.
</Info>


## OpenAPI

````yaml POST /v1/cv/score
openapi: 3.0.0
info:
  title: FastgenAI
  version: 1.0.0
servers:
  - url: https://app.fastgen.ai
security:
  - bearerAuth: []
tags:
  - name: /auth
  - name: /teams
  - name: /teams > /:teamID
  - name: /teams > /:teamID > /invitations
  - name: /teams > /:teamID > /users
  - name: /teams > /:teamID > /projects
  - name: /users
  - name: /users > /me
  - name: /users > /me > /teams
  - name: /projects
  - name: /projects > /users
  - name: /jobs
  - name: /cv
  - name: /scoring
  - name: /scoring > /templates
  - name: /scoring > /templates > /:templateId
  - name: /webhooks
  - name: /webhooks > /:webhookId
  - name: /webhooks > /:webhookId > /messages
  - name: /request_logs
paths:
  /v1/cv/score:
    post:
      tags:
        - /cv
      summary: Score
      parameters:
        - name: Fastgen-Project
          in: header
          schema:
            type: string
          required: true
          example: a23f3b87-cf68-4db2-966a-22108ca0ab66
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                cv_file:
                  type: string
                  format: binary
                  description: >-
                    Uploaded PDF file using multipart/form-data. Provide either
                    'cv_file' or 'cv_file_url' but not both.
                cv_file_url:
                  type: string
                  example: https://myFileHost/myCv.pdf
                  description: >-
                    publicly accessible URL where the PDF file is hosted.
                    Provide either 'cv_file' or 'cv_file_url' but not both.
                async:
                  type: boolean
                  example: 'true'
                  description: >-
                    Controls whether the result is returned via the http
                    response or delivered via the users webhook endpoints. If
                    set to true, the server will respond with 202 and return the
                    webhook message id under which the result will be deliverd.
                    The same webhook message id, is then found in the webhook
                    message payload later alongside the result. Defaults to
                    false.
                scoring_template:
                  type: string
                  example: '{ ... }'
                  description: >-
                    The scoring template provided directly to the request. See
                    https://partner-docs.fastgen.ai/api-reference/endpoint/scoringTemplate/create
                    regarding the format. Usually it is better to use
                    'scoring_template_id' instead. Provide either
                    'scoring_template' or 'scoring_template_id' but not both.
                scoring_template_id:
                  type: string
                  example: f7c31bda-f918-4249-a3bc-9a1903fe9f6d
                  description: >-
                    The scoring template provided via its id. See
                    https://partner-docs.fastgen.ai/api-reference/endpoint/scoringTemplate/create.
                    Provide either 'scoring_template' or 'scoring_template_id'
                    but not both.
                language:
                  type: string
                  example: en
                  description: >-
                    Controls the language of the AI Evaluation text. Defaults to
                    'en'
                  enum:
                    - de
                    - en
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CVEvaluationAIResponse'
        '202':
          description: Accepted for async processing and reporting via Webhooks
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook_message_id:
                    type: string
                    example: 4bc3e0d4-f5b9-41e6-9591-211e5427fb04
components:
  schemas:
    CVEvaluationAIResponse:
      allOf:
        - $ref: '#/components/schemas/CVEvaluationResponse'
        - type: object
          properties:
            ai_evaluation:
              type: object
              properties:
                candidate_info:
                  type: object
                  properties:
                    name:
                      type: string
                    position_applied:
                      type: string
                    years_experience:
                      type: integer
                professional_experience:
                  $ref: '#/components/schemas/Score'
                education_qualifications:
                  $ref: '#/components/schemas/Score'
                skills:
                  $ref: '#/components/schemas/Score'
                additional_factors:
                  $ref: '#/components/schemas/Score'
                total_score:
                  type: integer
                summary_reasoning:
                  type: string
                recommended_interview_focus:
                  type: string
    CVEvaluationResponse:
      type: object
      properties:
        personal_information:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
            address:
              type: string
            sex:
              type: string
            phone_number:
              type: string
            date_of_birth:
              type: string
              format: date
        skills:
          type: array
          items:
            type: object
            properties:
              skill:
                type: string
              proficiency_level:
                type: string
        professional_experience:
          type: array
          items:
            type: object
            properties:
              company:
                type: string
              description:
                type: string
              start_date:
                type: string
                format: date
              end_date:
                type: string
                format: date
                nullable: true
              position:
                type: string
              location:
                type: string
              internship:
                type: boolean
              work_type:
                type: string
        education:
          type: array
          items:
            type: object
            properties:
              school:
                type: string
              degree:
                type: string
              start_date:
                type: string
                format: date
              end_date:
                type: string
                format: date
              grade_text:
                type: string
                nullable: true
              grade_value:
                type: number
                nullable: true
        certifications:
          type: array
          items:
            type: object
            properties:
              issuer:
                type: string
              start_date:
                type: string
                format: date
              end_date:
                type: string
                format: date
              credential_id:
                type: string
              credential_url:
                type: string
              name:
                type: string
        languages:
          type: array
          items:
            type: object
            properties:
              language:
                type: string
              proficiency_level:
                type: string
    Score:
      type: object
      properties:
        score:
          type: integer
        weight:
          type: integer
        ai_reasoning:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````