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

# Parse a DOCX file into resume data

> Extracts structured resume data from a DOCX or DOC file using the specified AI provider. The file should be sent as a base64-encoded string along with AI provider credentials and the document's media type. Returns a complete ResumeData object. Requires authentication.



## OpenAPI

````yaml /spec.json post /ai/parse-docx
openapi: 3.1.1
info:
  title: Reactive Resume
  version: 5.1.0
  description: Reactive Resume API
  license:
    name: MIT
    url: https://github.com/amruthpillai/reactive-resume/blob/main/LICENSE
  contact:
    name: Amruth Pillai
    email: hello@amruthpillai.com
    url: https://amruthpillai.com
servers:
  - url: http://localhost:3000/api/openapi
security:
  - apiKey: []
externalDocs:
  url: https://docs.rxresu.me
  description: Reactive Resume Documentation
paths:
  /ai/parse-docx:
    post:
      tags:
        - AI
      summary: Parse a DOCX file into resume data
      description: >-
        Extracts structured resume data from a DOCX or DOC file using the
        specified AI provider. The file should be sent as a base64-encoded
        string along with AI provider credentials and the document's media type.
        Returns a complete ResumeData object. Requires authentication.
      operationId: parseResumeDocx
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  enum:
                    - openai
                    - anthropic
                    - gemini
                    - vercel-ai-gateway
                    - openrouter
                    - ollama
                  type: string
                model:
                  type: string
                  minLength: 1
                apiKey:
                  type: string
                  minLength: 1
                baseURL:
                  type: string
                  default: ''
                file:
                  type: object
                  properties:
                    name:
                      type: string
                    data:
                      type: string
                      maxLength: 13981018
                  required:
                    - name
                    - data
                mediaType:
                  enum:
                    - application/msword
                    - >-
                      application/vnd.openxmlformats-officedocument.wordprocessingml.document
                  type: string
              required:
                - provider
                - model
                - apiKey
                - file
                - mediaType
      responses:
        '200':
          description: The DOCX was successfully parsed into structured resume data.
          content:
            application/json:
              schema:
                anyOf:
                  - {}
                  - not: {}
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BAD_REQUEST
                      status:
                        const: 400
                      message:
                        type: string
                        default: The AI returned an improperly formatted structure.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '502':
          description: '502'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BAD_GATEWAY
                      status:
                        const: 502
                      message:
                        type: string
                        default: The AI provider returned an error or is unreachable.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: The API key to authenticate requests.

````