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

# Analyze pitch deck with AI

> Use AI to analyze the company's pitch deck and extract structured data
including company information, founder details, and key insights.

The analysis populates:
- `metadata.founders` - Team member information
- `metadata.ai_analysis` - Brief company description
- `metadata.analyzed_at` - When analysis was performed
- `metadata.user_preferences` - Extracted custom field values

**Note**: This operation consumes AI credits.




## OpenAPI

````yaml openapi.json post /companies/{id}/analyze
openapi: 3.1.0
info:
  title: Roulette API
  version: 1.0.0
  description: >
    The Roulette API provides programmatic access to manage your VC deal flow,

    companies, contacts, and related data.


    ## Authentication


    All API requests require authentication using a Bearer token. Include your
    API key

    in the `Authorization` header:


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    You can generate API keys from your account settings in the Roulette
    dashboard.


    ## Rate Limiting


    API requests are rate limited to ensure fair usage. Current limits:

    - 1000 requests per minute per API key

    - 100 requests per second per API key


    Rate limit headers are included in all responses:

    - `X-RateLimit-Limit`: Maximum requests per window

    - `X-RateLimit-Remaining`: Requests remaining in current window

    - `X-RateLimit-Reset`: Unix timestamp when the window resets


    ## Pagination


    List endpoints support cursor-based pagination using the following query
    parameters:

    - `page`: Page number (default: 1)

    - `limit`: Items per page (default: 25, max: 100)


    Paginated responses include pagination metadata:

    ```json

    {
      "data": [...],
      "pagination": {
        "page": 1,
        "limit": 25,
        "has_next": true,
        "has_prev": false
      }
    }

    ```


    **Note**: For performance reasons, total counts (`total`, `total_pages`) are
    not included.

    Use `has_next` and `has_prev` to determine if more pages exist.


    ## Errors


    The API uses standard HTTP status codes and returns errors in a consistent
    format:


    ```json

    {
      "success": false,
      "error": "Human readable error message",
      "data": null
    }

    ```


    Common status codes:

    - `400` Bad Request - Invalid parameters or request body

    - `401` Unauthorized - Missing or invalid API key

    - `403` Forbidden - Valid API key but insufficient permissions

    - `404` Not Found - Resource not found

    - `429` Too Many Requests - Rate limit exceeded

    - `500` Internal Server Error - Server-side error
  termsOfService: https://www.useroulette.com/terms
  contact:
    name: Roulette API Support
    email: support@useroulette.com
    url: https://www.useroulette.com/support
  license:
    name: Proprietary
    url: https://www.useroulette.com/license
servers:
  - url: https://www.useroulette.com/api/v1
    description: Production server
  - url: http://localhost:3000/api/v1
    description: Local development server
security:
  - BearerAuth: []
tags:
  - name: Companies
    description: >
      Manage companies in your deal flow pipeline. Companies represent potential

      investment opportunities with associated pitch decks, contacts, and
      metadata.
  - name: Company Statuses
    description: |
      Manage deal flow stages/statuses for organizing companies through your
      investment pipeline (e.g., "Initial Review", "Due Diligence", "Closed").
  - name: Company Settings
    description: |
      Configure custom fields and settings for company tracking.
  - name: Contacts
    description: |
      Manage contacts associated with companies, including founders, executives,
      and other key personnel.
  - name: Form Submissions
    description: |
      Access form submissions from integrated platforms like Tally.
  - name: Emails
    description: |
      Manage emails linked to companies and contacts.
  - name: Meeting Minutes
    description: |
      Store and retrieve meeting notes and minutes related to companies.
  - name: Shared Links
    description: |
      Create and manage secure shareable links for company portfolios.
  - name: Integrations
    description: |
      Configure third-party integrations (Tally, Specter, etc.).
  - name: Investor Dashboard
    description: |
      Configure and manage investor-facing portfolio dashboards.
  - name: Dashboard
    description: |
      Access aggregated dashboard data and analytics.
  - name: Team Members
    description: |
      View team members and their roles within your account.
  - name: Short URLs
    description: |
      Create shortened URLs with optional password protection.
paths:
  /companies/{id}/analyze:
    post:
      tags:
        - Companies
      summary: Analyze pitch deck with AI
      description: |
        Use AI to analyze the company's pitch deck and extract structured data
        including company information, founder details, and key insights.

        The analysis populates:
        - `metadata.founders` - Team member information
        - `metadata.ai_analysis` - Brief company description
        - `metadata.analyzed_at` - When analysis was performed
        - `metadata.user_preferences` - Extracted custom field values

        **Note**: This operation consumes AI credits.
      operationId: analyzeCompany
      parameters:
        - $ref: '#/components/parameters/CompanyIdParam'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                extraData:
                  type: string
                  maxLength: 40000
                  description: |
                    Additional text context to include in the analysis.
                    Can contain supplementary information like email threads,
                    meeting notes, or other relevant content that helps the AI
                    better understand the company.
      responses:
        '200':
          description: Analysis completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyzeResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    CompanyIdParam:
      name: id
      in: path
      required: true
      description: The unique identifier of the company
      schema:
        type: string
        format: uuid
      example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
  schemas:
    AnalyzeResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
        data:
          type: object
          description: Analysis results extracted from the pitch deck
          properties:
            company_name:
              type: string
              nullable: true
              description: Company name extracted from the deck (if detected)
              example: Acme Technologies
            ai_analysis:
              type: string
              description: AI-generated company summary/description
              example: >-
                B2B SaaS platform providing enterprise workflow automation with
                AI-powered document processing.
            founders:
              type: array
              description: Founder/team information extracted from the deck
              items:
                $ref: '#/components/schemas/Founder'
            user_preferences:
              type: array
              description: >-
                Custom field values extracted based on account's configured
                fields
              items:
                $ref: '#/components/schemas/UserPreference'
    Founder:
      type: object
      description: Information about a company founder or team member
      properties:
        name:
          type: string
          description: Full name
          example: Jane Smith
        email:
          type: string
          format: email
          nullable: true
          description: Email address
          example: jane@example.com
        phone:
          type: string
          nullable: true
          description: Phone number
          example: +1-555-123-4567
        title:
          type: string
          nullable: true
          description: Job title/role
          example: CEO/Co-Founder
        background:
          type: string
          nullable: true
          description: Professional background summary
          example: Former engineer at Google, 10 years in enterprise software
        linkedin_profile:
          type: string
          format: uri
          nullable: true
          description: LinkedIn profile URL
          example: https://www.linkedin.com/in/example/
    UserPreference:
      type: object
      description: |
        Custom field for tracking company data. Supports multiple field types:
        - `text`: Free-form text input
        - `boolean`: True/false toggle
        - `select`: Single selection from predefined options
      required:
        - type
        - field
      properties:
        type:
          type: string
          enum:
            - text
            - boolean
            - select
          description: Field type
          example: select
        field:
          type: string
          description: Field name/label
          example: Industry
        value:
          oneOf:
            - type: string
            - type: boolean
            - type: 'null'
          description: Current value (type depends on field type)
          example: AI/ML
        options:
          type: array
          items:
            type: string
          description: Available options (for select fields)
          example:
            - SaaS
            - Fintech
            - AI/ML
            - Developer Tools
        show_in_table:
          type: boolean
          description: Whether this field is displayed in the companies table view
          default: false
          example: true
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Human-readable error message
          example: Invalid request body
        data:
          type: 'null'
          example: null
        authType:
          type: string
          enum:
            - api_key
            - session
          example: api_key
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Invalid or expired API key
            data: null
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Resource not found
            data: null
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Internal server error
            data: null
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        API key authentication. Generate keys from your account settings.

        Include in header: `Authorization: Bearer YOUR_API_KEY`

````