FriendliAI Container.Classification API

The Container.Classification API from FriendliAI — 1 operation(s) for container.classification.

Operations 1

POST /classify Text classification #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/friendliai-container-classification-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

friendliai-container-classification-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendli Suite API Reference Container.Audio Container.Classification API
  description: This is an OpenAPI reference of Friendli Suite API.
  termsOfService: https://friendli.ai/terms-of-service
  contact:
    name: FriendliAI Support Team
    email: support@friendli.ai
  version: 0.1.0
servers:
- url: https://api.friendli.ai
tags:
- name: Container.Classification
paths:
  /classify:
    servers:
    - url: http://localhost:8000
    post:
      tags:
      - Container.Classification
      summary: Text classification
      description: Classify text input into categories with per-class probabilities.
      operationId: containerTextClassification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerTextClassificationBody'
        required: true
      responses:
        '200':
          description: Successfully classified the text input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerTextClassificationSuccess'
              examples:
                Example:
                  value:
                    data:
                    - index: 0
                      label: Positive
                      num_classes: 2
                      probs:
                      - 0.9
                      - 0.1
                    object: list
                    usage:
                      prompt_tokens: 5
                      total_tokens: 5
        '422':
          description: Unprocessable Entity
      x-speakeasy-name-override: classify
      x-mint:
        metadata:
          title: Container Text Classification
          sidebarTitle: Text Classification
          og:title: Container Text Classification
          description: Classify text input into categories with per-class probabilities.
          og:description: Classify text input into categories with per-class probabilities.
        href: /openapi/container/text-classification
        content: Classify text input into categories with per-class probabilities.
components:
  schemas:
    TextClassificationUsage:
      properties:
        prompt_tokens:
          type: integer
          title: Prompt Tokens
          description: Number of tokens in the input text.
          examples:
          - 10
        total_tokens:
          type: integer
          title: Total Tokens
          description: Total number of tokens used in the request.
          examples:
          - 10
      type: object
      required:
      - prompt_tokens
      - total_tokens
      title: TextClassificationUsage
    BaseClassificationData:
      properties:
        index:
          type: integer
          title: Index
          description: The index of the input in the list of inputs.
          examples:
          - 0
        label:
          type: string
          title: Label
          description: The predicted label for the input text.
          examples:
          - Positive
        num_classes:
          type: integer
          title: Num Classes
          description: The number of possible labels the model can predict.
          examples:
          - 2
        probs:
          items:
            type: number
          type: array
          title: Probs
          description: A list of logits for each possible label.
          examples:
          - - 0.1
            - 0.9
      type: object
      required:
      - index
      - label
      - num_classes
      - probs
      title: BaseClassificationData
    ContainerTextClassificationSuccess:
      $ref: '#/components/schemas/TextClassificationResult'
      title: ContainerTextClassificationSuccess
    ContainerTextClassificationBody:
      properties:
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
          description: Routes the request to a specific adapter.
          examples:
          - (adapter-route)
        input:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
          - type: 'null'
          title: Input
          description: 'Input text to classify, encoded as a string or array of strings. To classify multiple inputs in a single request, pass an array of strings.


            Either `input` or `tokens` field is required.'
          examples:
          - I love programming.
        tokens:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Tokens
          description: 'The tokenized prompt (i.e., input tokens).


            Either `input` or `tokens` field is required.'
          examples:
          - 72
          - 1563
          - 2335
          - 13
      type: object
      title: ContainerTextClassificationBody
      example:
        input: I love programming.
    TextClassificationResult:
      properties:
        data:
          items:
            $ref: '#/components/schemas/BaseClassificationData'
          type: array
          title: Data
        object:
          type: string
          const: list
          title: Object
          description: The object type, which is always set to `list`.
        usage:
          $ref: '#/components/schemas/TextClassificationUsage'
      type: object
      required:
      - data
      - object
      - usage
      title: TextClassificationResult
  securitySchemes:
    token:
      type: http
      description: 'When using Friendli Suite API for inference requests, you need to provide a **Friendli Token** for authentication and authorization purposes.


        For more detailed information, please refer [here](https://friendli.ai/docs/openapi/introduction#authentication).'
      scheme: bearer
x-speakeasy-retries:
  strategy: backoff
  backoff:
    initialInterval: 500
    maxInterval: 60000
    maxElapsedTime: 3600000
    exponent: 1.5
  statusCodes:
  - 429
  - 500
  - 502
  - 503
  - 504
  retryConnectionErrors: true