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

# token-classification

> Identify and categorize tokens in text for Named Entity Recognition (NER), Part-of-Speech tagging, and other NLP tasks



## OpenAPI

````yaml post /models/v2/dslim/bert-base-NER
openapi: 3.0.3
info:
  title: Open Source AI Models API – Multimodal
  description: >-
    API for running open-source AI models that take text, vision, audio, and
    video as input.
  version: 1.0.0
servers:
  - url: https://api.bytez.com
    description: Production server
security: []
paths:
  /models/v2/dslim/bert-base-NER:
    post:
      summary: token-classification
      description: >-
        Identify and categorize tokens in text for Named Entity Recognition
        (NER), Part-of-Speech tagging, and other NLP tasks
      operationId: token-classification
      requestBody:
        description: Schema for token-classification models
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: The input text
                  example: John Doe is a software engineer at Google
              required:
                - text
      responses:
        '200':
          description: Successful token-classification response.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - output
                properties:
                  error:
                    type: string
                    nullable: true
                    description: Null on success; otherwise an error message.
                  output:
                    type: array
                    description: Successful response with classified tokens
                    example:
                      - entity: B-PER
                        score: 0.9996556043624878
                        index: 1
                        word: John
                        start: 0
                        end: 4
                      - entity: I-PER
                        score: 0.999683141708374
                        index: 2
                        word: Do
                        start: 5
                        end: 7
                      - entity: I-PER
                        score: 0.9945255517959595
                        index: 3
                        word: '##e'
                        start: 7
                        end: 8
                      - entity: B-ORG
                        score: 0.9984006285667419
                        index: 9
                        word: Google
                        start: 35
                        end: 41
        '401':
          description: Auth error - check your api key and how you're sending it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  output:
                    type: string
                    example: null
        '429':
          description: Too Many Requests – You have hit the rate limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Rate limit exceeded
                  output:
                    type: string
                    example: null
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Set `Authorization` header to `BYTEZ_KEY` 
        ``` 'Authorization: YOUR_BYTEZ_KEY_HERE' ```

````