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

# Create embeddings

> Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.



## OpenAPI

````yaml /openapi/serverless-openapi.yaml post /v1/embeddings
openapi: 3.0.0
info:
  title: Nscale Inference API
  version: 1.26.0
servers:
  - url: https://inference.api.nscale.com
    description: Production
security: []
tags:
  - name: Inference
  - name: Models
paths:
  /v1/embeddings:
    post:
      tags:
        - Inference
      summary: Create embeddings
      description: >-
        Get a vector representation of a given input that can be easily consumed
        by machine learning models and algorithms.
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: '#/components/schemas/EmbeddingRequestBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/EmbeddingResponseBody'
          headers:
            INFERENCE-ID:
              required: true
              deprecated: false
              schema:
                type: string
        '400':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - IdentityAuthorization: []
components:
  schemas:
    EmbeddingRequestBody:
      type: object
      title: EmbeddingRequestBody
      required:
        - model
        - input
      properties:
        model:
          type: string
        input:
          $ref: '#/components/schemas/InputValue'
        encoding_format:
          type: string
          default: float
        dimensions:
          type: integer
          format: int32
        user:
          type: string
      example:
        dimensions: null
        encoding_format: float
        input: The food was delicious and the waiter was very friendly.
        model: Qwen3-Embedding-8B
        user: null
    EmbeddingResponseBody:
      type: object
      title: EmbeddingResponseBody
      required:
        - object
        - data
        - model
        - usage
      properties:
        object:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmbeddingObject'
        model:
          type: string
        usage:
          $ref: '#/components/schemas/EmbeddingUsage'
    ErrorResponse:
      type: object
      title: ErrorResponse
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
    InputValue:
      type: object
      anyOf:
        - type: string
        - type: array
          items:
            type: string
        - type: array
          items:
            type: integer
            format: int32
        - type: array
          items:
            type: array
            items:
              type: integer
              format: int32
    EmbeddingObject:
      type: object
      title: EmbeddingObject
      required:
        - object
        - index
        - embedding
      properties:
        object:
          type: string
        index:
          type: integer
          format: int32
        embedding:
          type: array
          items:
            type: number
            format: float
    EmbeddingUsage:
      type: object
      title: EmbeddingUsage
      required:
        - prompt_tokens
        - total_tokens
      properties:
        prompt_tokens:
          type: integer
          format: int32
        total_tokens:
          type: integer
          format: int32
    ApiError:
      type: object
      title: ApiError
      required:
        - code
        - message
        - error_type
      properties:
        code:
          type: string
        message:
          type: string
        param:
          type: string
        error_type:
          type: string
  securitySchemes:
    IdentityAuthorization:
      type: http
      description: Security scheme that accepts Unikorn Identity JWTs.
      scheme: bearer

````