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

# all-minilm-l6-v2

> Model details for all-minilm-l6-v2. 384-dimensional sentence embeddings for semantic search and RAG.

<Note>
  This model is routable only on `/v1/embeddings`. A `/responses` or
  `/chat/completions` call with an embedding model returns `400`. Send `input`
  as a string, or as an array of strings to embed a batch in one request. The
  response `model` field reads `all-MiniLM-L6-v2`, the upstream capitalization
  of the id you send.
</Note>

> Sentence-Transformers' all-MiniLM-L6-v2 is the default workhorse of semantic search. It maps a sentence or short paragraph to a 384-dimensional vector, trained with contrastive learning on more than a billion sentence pairs, so cosine distance between two vectors tracks how close the two texts are in meaning. At 22.7M parameters it embeds fast and cheap enough to index a whole corpus and re-embed it whenever your content changes, which is what retrieval-augmented generation, deduplication, clustering, and recommendation pipelines actually need. Inputs are truncated at 256 tokens, so embed chunks rather than whole documents.

Embeddings are priced on input tokens only. There are no output tokens to bill, so a call costs \$0.50 per 1M tokens embedded.

**References:** [Model card](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) • [License](https://www.apache.org/licenses/LICENSE-2.0) • [Terms](https://zerogpu.ai/terms) • [Privacy](https://zerogpu.ai/privacy-policy)


## OpenAPI

````yaml api-reference/openapi/playgrounds/all-minilm-l6-v2.openapi.json POST /embeddings
openapi: 3.1.0
info:
  title: all-minilm-l6-v2 playground
  version: '1.0'
  description: >-
    Interactive playground for **all-minilm-l6-v2**.

    Model is always `all-minilm-l6-v2` on this page (shown in the form, not
    editable).

    Authentication: `x-api-key` (required) and `x-project-id` (optional).
servers:
  - url: https://api.zerogpu.ai/v1
    description: Production
security:
  - ApiKey: []
paths:
  /embeddings:
    post:
      tags:
        - all-minilm-l6-v2
      summary: 'all-minilm-l6-v2: Embeddings'
      operationId: createEmbedding_all-minilm-l6-v2
      parameters:
        - name: x-project-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional project identifier. Scopes the request to a specific
            project when provided.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmbeddingRequest'
            examples:
              default:
                summary: Single text
                value:
                  model: all-minilm-l6-v2
                  input: >-
                    ZeroGPU runs high-volume inference tasks on small models at
                    the edge.
              batch:
                summary: Batch of texts
                value:
                  model: all-minilm-l6-v2
                  input:
                    - first text
                    - second text
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
              examples:
                default:
                  summary: Default
                  value:
                    object: list
                    data:
                      - object: embedding
                        index: 0
                        embedding:
                          - 0.012601
                          - -0.072932
                          - 0.043332
                          - 0.028129
                          - 0.033064
                          - -0.078302
                          - -0.153619
                          - -0.011621
                    model: all-MiniLM-L6-v2
                    usage:
                      prompt_tokens: 18
                      total_tokens: 18
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '420':
          description: Insufficient quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
components:
  schemas:
    CreateEmbeddingRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          const: all-minilm-l6-v2
          default: all-minilm-l6-v2
          example: all-minilm-l6-v2
          description: Model identifier (fixed for this playground).
        input:
          description: >-
            Text to embed. A single string, or an array of strings for one
            vector per element. Inputs are truncated at 256 tokens.
          oneOf:
            - type: string
              minLength: 1
              format: textarea
              maxLength: 131072
            - type: array
              minItems: 1
              items:
                type: string
                minLength: 1
    EmbeddingResponse:
      type: object
      description: >-
        An OpenAI-compatible embedding list. Vectors are truncated in this
        example; each has 384 dimensions.
      additionalProperties: true
    ErrorResponse:
      type: object
      additionalProperties: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````