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

# Instant Classification

> Classify a company using the instant classification service.

This endpoint requires authentication. The user must be logged in with a valid JWT token.



## OpenAPI

````yaml https://instant-classification-api.thedatacity.com/api/v1/openapi.json post /api/v1/instantClassification
openapi: 3.1.0
info:
  title: Instant Classification API
  version: 0.1.0
servers:
  - url: https://instant-classification-api.thedatacity.com
    description: Production
security: []
paths:
  /api/v1/instantClassification:
    post:
      tags:
        - classification
      summary: Instant Classification
      description: >-
        Classify a company using the instant classification service.


        This endpoint requires authentication. The user must be logged in with a
        valid JWT token.
      operationId: classification-instant_classification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstantClassificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstantClassificationResponse'
        '400':
          description: Invalid request, or the account is inactive.
        '401':
          description: >-
            No Authorization header, or the token is expired, malformed or no
            longer identifies an account. Get a new token.
        '402':
          description: Free-tier usage quota exhausted.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded. Body uses an `error` key rather than `detail`.
        '500':
          description: Unexpected server error.
        '502':
          description: The upstream classification engine returned an error.
        '503':
          description: >-
            Classification engine unreachable or timed out after server-side
            retries. Timeouts surface here rather than as 504.
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    InstantClassificationRequest:
      properties:
        Text:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Text
          description: >-
            Company description to classify. Send either Text or Website, not
            both.
        Website:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Website
          description: >-
            Company website URL to classify. Send either Website or Text, not
            both.
      type: object
      title: InstantClassificationRequest
      description: Request model for instant company classification.
      examples:
        - Text: Software development and consulting services
        - Website: https://example.com
    InstantClassificationResponse:
      properties:
        RTICs:
          anyOf:
            - items:
                $ref: '#/components/schemas/ClassificationResult'
              type: array
            - type: 'null'
          title: Rtics
          description: Real Time Industry Classification codes
          default: []
        SimilarCompanies:
          anyOf:
            - items:
                $ref: '#/components/schemas/SimilarCompany'
              type: array
            - type: 'null'
          title: Similarcompanies
          description: Companies with similar business activities
          default: []
        RSICs:
          anyOf:
            - items:
                $ref: '#/components/schemas/RSIC'
              type: array
            - type: 'null'
          title: Rsics
          description: Recommended Standard Industrial Classification codes
          default: []
        RNAICs:
          anyOf:
            - items:
                $ref: '#/components/schemas/RNAIC'
              type: array
            - type: 'null'
          title: Rnaics
          description: Recommended North American Industry Classification codes
          default: []
        SICs:
          anyOf:
            - items:
                $ref: '#/components/schemas/SIC'
              type: array
            - type: 'null'
          title: Sics
          description: Standard Industrial Classification codes
          default: []
        TotalWordsProcessed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalwordsprocessed
          description: Total number of words processed during classification
        ProcessingTimeMs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Processingtimems
          description: Processing time in milliseconds
        Website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Company website if provided
        Description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Company description text that was classified
      type: object
      title: InstantClassificationResponse
      description: Response model for instant company classification results.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClassificationResult:
      properties:
        Code:
          type: string
          title: Code
        Description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        Score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
        WordsMatched:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wordsmatched
      type: object
      required:
        - Code
      title: ClassificationResult
    SimilarCompany:
      properties:
        CompanyNumber:
          type: string
          title: Companynumber
        CompanyName:
          type: string
          title: Companyname
        Website:
          type: string
          title: Website
        Similarity:
          type: number
          title: Similarity
      type: object
      required:
        - CompanyNumber
        - CompanyName
        - Website
        - Similarity
      title: SimilarCompany
    RSIC:
      properties:
        Code:
          type: string
          title: Code
        Description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        Score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
      type: object
      required:
        - Code
      title: RSIC
    RNAIC:
      properties:
        Code:
          type: string
          title: Code
        Description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        Score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
      type: object
      required:
        - Code
      title: RNAIC
    SIC:
      properties:
        Code:
          type: string
          title: Code
        Description:
          type: string
          title: Description
      type: object
      required:
        - Code
        - Description
      title: SIC
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/v1/login/access-token

````