> ## 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.

# zero-shot-classification

> Classify text into categories not seen during training for applications like intent detection, content moderation, and dynamic classification



## OpenAPI

````yaml post /models/v2/facebook/bart-large-mnli
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/facebook/bart-large-mnli:
    post:
      summary: zero-shot-classification
      description: >-
        Classify text into categories not seen during training for applications
        like intent detection, content moderation, and dynamic classification
      operationId: zero-shot-classification
      requestBody:
        description: Schema for zero-shot-classification models
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  example: One day I will see the world
                candidate_labels:
                  type: array
                  example:
                    - travel
                    - cooking
                    - dancing
                  items:
                    type: string
              required:
                - text
                - candidate_labels
      responses:
        '200':
          description: Successful zero-shot-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: object
                    description: >-
                      Successful response with text-classification sequence,
                      labels, and scores
                    example:
                      sequence: One day I will see the world
                      labels:
                        - travel
                        - dancing
                        - cooking
                      scores:
                        - 0.9941015839576721
                        - 0.0031261409167200327
                        - 0.002772255800664425
        '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' ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.