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

# image-classification

> Categorize images into predefined classes for tasks like object recognition, medical imaging, and security systems



## OpenAPI

````yaml post /models/v2/google/vit-base-patch16-224
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/google/vit-base-patch16-224:
    post:
      summary: image-classification
      description: >-
        Categorize images into predefined classes for tasks like object
        recognition, medical imaging, and security systems
      operationId: image-classification
      requestBody:
        description: Schema for image-classification models
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  example: >-
                    https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg
                base64:
                  type: string
                  example: >-
                    data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is
                    you are not using a url)
              required:
                - url
      responses:
        '200':
          description: Successful image-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 the classification labels
                    example:
                      - label: beagle
                        score: 0.5398777723312378
                      - label: Egyptian cat
                        score: 0.12709936499595642
                      - label: English foxhound
                        score: 0.04305768758058548
                      - label: tabby, tabby cat
                        score: 0.03387906029820442
                      - label: Walker hound, Walker foxhound
                        score: 0.02507072128355503
        '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' ```

````